[PATCH] ufs, better support for different bsd:s, kernel 2.1.132

Mattias Amnefelt (mattiasa@stacken.kth.se)
24 Dec 1998 00:24:46 +0100


The following patch for 2.1.132 fixes so the Linux kernel also recognizes
OpenBSD, NetBSD and BSDI disklabels as UFS labels. It has only been tested
for OpenBSD (but I see no reason why it shouldn't work on any of the
others, asuming the ufs-support is correct.)

This was written by Assar Westerlund <assar@stacken.kth.se>

/mattiasa

--- linux/drivers/block/genhd.c- Mon Nov 16 19:32:58 1998
+++ linux/drivers/block/genhd.c Wed Dec 23 22:42:56 1998
@@ -476,7 +476,10 @@
hd->part[minor].nr_sects = 2;
}
#ifdef CONFIG_BSD_DISKLABEL
- if (SYS_IND(p) == BSD_PARTITION) {
+ if (SYS_IND(p) == FREEBSD_PARTITION ||
+ SYS_IND(p) == OPENBSD_PARTITION ||
+ SYS_IND(p) == NETBSD_PARTITION ||
+ SYS_IND(p) == BSDI_PARTITION) {
printk(" <");
bsd_disklabel_partition(hd, MKDEV(hd->major, minor));
printk(" >");
--- linux/include/linux/genhd.h- Wed Dec 23 22:06:05 1998
+++ linux/include/linux/genhd.h Wed Dec 23 22:44:31 1998
@@ -110,7 +110,10 @@
* BSD disklabel support by Yossi Gottlieb <yogo@math.tau.ac.il>
*/

-#define BSD_PARTITION 0xa5 /* Partition ID */
+#define FREEBSD_PARTITION 0xa5 /* FreeBSD Partition ID */
+#define OPENBSD_PARTITION 0xa6 /* OpenBSD Partition ID */
+#define NETBSD_PARTITION 0xa9 /* NetBSD Partition ID */
+#define BSDI_PARTITION 0xb7 /* BSDI Partition ID */

#define BSD_DISKMAGIC (0x82564557UL) /* The disk magic number */
#define BSD_MAXPARTITIONS 8

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/