patch-2.2.0-pre7 linux/drivers/block/genhd.c

Next file: linux/drivers/char/epca.c
Previous file: linux/drivers/block/floppy.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre6/linux/drivers/block/genhd.c linux/drivers/block/genhd.c
@@ -439,7 +439,7 @@
 #ifdef CONFIG_BSD_DISKLABEL
 	/* no bsd disklabel as a default */
 	kdev_t bsd_kdev = 0;
-	int bsd_maxpart;
+	int bsd_maxpart = BSD_MAXPARTITIONS;
 #endif
 #ifdef CONFIG_BLK_DEV_IDE
 	int tested_for_xlate = 0;
@@ -558,23 +558,15 @@
 		}
 #ifdef CONFIG_BSD_DISKLABEL
 			/* tag first disklabel for late recognition */
-		if (SYS_IND(p) == BSD_PARTITION) {
+		if (SYS_IND(p) == BSD_PARTITION || SYS_IND(p) == NETBSD_PARTITION) {
 			printk("!");
-			if (!bsd_kdev) {
+			if (!bsd_kdev)
 				bsd_kdev = MKDEV(hd->major, minor);
-				bsd_maxpart = BSD_MAXPARTITIONS;
-			}
 		} else if (SYS_IND(p) == OPENBSD_PARTITION) {
 			printk("!");
 			if (!bsd_kdev) {
 				bsd_kdev = MKDEV(hd->major, minor);
 				bsd_maxpart = OPENBSD_MAXPARTITIONS;
-			}
-		} else if (SYS_IND(p) == NETBSD_PARTITION) {
-			printk("!");
-			if (!bsd_kdev) {
-				bsd_kdev = MKDEV(hd->major, minor);
-				bsd_maxpart = BSD_MAXPARTITIONS;
 			}
 		}
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov