Re: Installation & boot problems
From: Brian Gregor <bgregor@buphy.bu.edu>
Subject: Re: Installation & boot problems
Date: Fri, 11 Jun 1999 11:50:06 -0400
> Oops, I think you forgot the patch...
I'm sorry!
Index: ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/gnumach/ChangeLog,v
retrieving revision 1.46
diff -u -r1.46 ChangeLog
--- ChangeLog 1999/06/02 07:00:19 1.46
+++ ChangeLog 1999/06/11 15:15:59
@@ -1,3 +1,12 @@
+1999-06-07 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
+
+ * linux/dev/drivers/block/genhd.c [MACH] (mach_minor): New
+ variable.
+ (add_bsd_partition): New function.
+ (bsd_disklabel_partition) [MACH]: Call add_bsd_partition.
+ (msdos_partition) [MACH]: Set mach_minor to MINOR before
+ calling bsd_disklabel_partition.
+
1999-06-02 Roland McGrath <roland@baalperazim.frob.com>
* kern/bootstrap.c (build_args_and_stack): If kernel_cmdline is
Index: linux/dev/drivers/block/genhd.c
===================================================================
RCS file: /usr/local/cvsroot/gnumach/linux/dev/drivers/block/genhd.c,v
retrieving revision 1.2
diff -u -r1.2 genhd.c
--- genhd.c 1999/05/04 15:30:41 1.2
+++ genhd.c 1999/06/11 15:16:03
@@ -111,6 +111,19 @@
printk(" %s", disk_name(hd, minor, buf));
}
+#ifdef MACH
+static int mach_minor;
+static void
+add_bsd_partition (struct gendisk *hd, int minor, int slice,
+ int start, int size)
+{
+ char buf[16];
+ hd->part[minor].start_sect = start;
+ hd->part[minor].nr_sects = size;
+ printk (" %s%c", disk_name (hd, mach_minor, buf), slice);
+}
+#endif
+
static inline int is_extended_partition(struct partition *p)
{
return (SYS_IND(p) == DOS_EXTENDED_PARTITION ||
@@ -240,46 +253,20 @@
p = &l->d_partitions[0];
while (p - &l->d_partitions[0] <= BSD_MAXPARTITIONS) {
-#ifdef MACH
- /* Print BSD slices like hd0s1a (Mach syntax) instead of hd0s5
- (Linux syntax), and do not add them into HD. In Mach,
- the partitions of HD will not be used anyway. */
- if (p->p_fstype != BSD_FS_UNUSED)
- {
- unsigned int part = current_minor & mask;
- const char *maj = hd->major_name;
- char unit = (current_minor >> hd->minor_shift) + '0';
- char slice = p - &l->d_partitions[0] + 'a';
-
-#ifdef CONFIG_BLK_DEV_IDE
- switch (hd->major)
- {
- case IDE3_MAJOR:
- unit += 2;
- case IDE2_MAJOR:
- unit += 2;
- case IDE1_MAJOR:
- unit += 2;
- case IDE0_MAJOR:
- maj = "hd";
- }
-#endif
- if (part)
- printk (" %s%cs%d%c", maj, unit, part, slice);
- else
- printk (" %s%c%c", maj, unit, slice);
- }
- p++;
-#else /* ! MACH */
if ((current_minor & mask) >= (4 + hd->max_p))
break;
if (p->p_fstype != BSD_FS_UNUSED) {
+#ifdef MACH
+ add_bsd_partition (hd, current_minor,
+ p - &l->d_partitions[0] + 'a',
+ p->p_offset, p->p_size);
+#else
add_partition(hd, current_minor, p->p_offset, p->p_size);
+#endif
current_minor++;
}
p++;
-#endif /* ! MACH */
}
brelse(bh);
@@ -412,6 +399,9 @@
#ifdef CONFIG_BSD_DISKLABEL
if (SYS_IND(p) == BSD_PARTITION) {
printk(" <");
+#ifdef MACH
+ mach_minor = minor;
+#endif
bsd_disklabel_partition(hd, MKDEV(hd->major, minor));
printk(" >");
}
Index: linux/dev/drivers/block/ide.c
===================================================================
RCS file: /usr/local/cvsroot/gnumach/linux/dev/drivers/block/ide.c,v
retrieving revision 1.1
diff -u -r1.1 ide.c
--- ide.c 1999/04/26 05:41:56 1.1
+++ ide.c 1999/06/11 15:16:14
@@ -1577,8 +1577,14 @@
block = rq->sector;
blockend = block + rq->nr_sectors;
if ((blockend < block) || (blockend > drive->part[minor&PARTN_MASK].nr_sects)) {
+#ifdef MACH
+ printk ("%s%c: bad access: block=%ld, count=%ld, blockend=%ld, nr_sects\n",
+ drive->name, (minor&PARTN_MASK)?'0'+(minor&PARTN_MASK):' ',
+ block, rq->nr_sectors, blockend, drive->part[minor&PARTN_MASK].nr_sects);
+#else
printk("%s%c: bad access: block=%ld, count=%ld\n", drive->name,
(minor&PARTN_MASK)?'0'+(minor&PARTN_MASK):' ', block, rq->nr_sectors);
+#endif
goto kill_rq;
}
block += drive->part[minor&PARTN_MASK].start_sect + drive->sect0;
Reply to: