patch-2.2.14 linux/drivers/block/genhd.c
Next file: linux/drivers/block/ide-cd.c
Previous file: linux/drivers/block/Config.in
Back to the patch index
Back to the overall index
- Lines: 85
- Date:
Tue Jan 4 10:12:14 2000
- Orig file:
v2.2.13/linux/drivers/block/genhd.c
- Orig date:
Tue Jan 4 11:10:33 2000
diff -u --recursive --new-file v2.2.13/linux/drivers/block/genhd.c linux/drivers/block/genhd.c
@@ -784,8 +784,11 @@
label = (struct sun_disklabel *) bh->b_data;
p = label->partitions;
if (be16_to_cpu(label->magic) != SUN_LABEL_MAGIC) {
+#if 0
+ /* There is no error here - it is just not a sunlabel. */
printk("Dev %s Sun disklabel: bad magic %04x\n",
kdevname(dev), be16_to_cpu(label->magic));
+#endif
brelse(bh);
return 0;
}
@@ -856,8 +859,11 @@
p = &label->partitions[0];
magic = label->magic_mushroom;
if(be32_to_cpu(magic) != SGI_LABEL_MAGIC) {
+#if 0
+ /* There is no error here - it is just not an sgilabel. */
printk("Dev %s SGI disklabel: bad magic %08x\n",
kdevname(dev), magic);
+#endif
brelse(bh);
return 0;
}
@@ -1049,7 +1055,8 @@
int dev_bsize, dev_pos, pos;
unsigned secsize;
#ifdef CONFIG_PPC
- int first_bootable = 1;
+ int found_root = 0;
+ int found_root_goodness = 0;
#endif
struct mac_partition *part;
struct mac_driver_desc *md;
@@ -1107,16 +1114,36 @@
* If this is the first bootable partition, tell the
* setup code, in case it wants to make this the root.
*/
- if ( (_machine == _MACH_Pmac) && first_bootable
- && (be32_to_cpu(part->status) & MAC_STATUS_BOOTABLE)
- && strcasecmp(part->processor, "powerpc") == 0) {
- note_bootable_part(dev, blk);
- first_bootable = 0;
+ if (_machine == _MACH_Pmac) {
+ int goodness = 0;
+
+ if ((be32_to_cpu(part->status) & MAC_STATUS_BOOTABLE)
+ && strcasecmp(part->processor, "powerpc") == 0)
+ goodness++;
+
+ if (strcasecmp(part->type, "Apple_UNIX_SVR2") == 0) {
+ goodness++;
+ if ((strcmp(part->name, "/") == 0) ||
+ (strstr(part->name, "root") != 0)) {
+ goodness++;
+ }
+ if (strncmp(part->name, "swap", 4) == 0)
+ goodness--;
+ }
+
+ if (goodness > found_root_goodness) {
+ found_root = blk;
+ found_root_goodness = goodness;
+ }
}
#endif /* CONFIG_PPC */
++current_minor;
}
+#ifdef CONFIG_PPC
+ if (found_root_goodness)
+ note_bootable_part(dev, found_root);
+#endif
brelse(bh);
printk("\n");
return 1;
@@ -1450,7 +1477,7 @@
#ifdef CONFIG_BLK_CPQ_DA
cpqarray_init();
#endif
-#ifdef CONFIG_INET
+#ifdef CONFIG_NET
net_dev_init();
#endif
#ifdef CONFIG_VT
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)