Re: CONFIG_BSD_DISKLABEL

Alan Cox (alan@lxorguk.ukuu.org.uk)
Mon, 28 Dec 1998 13:24:29 +0000 (GMT)


> 2.1.133-5 fails to compile if CONFIG_BSD_DISKLABEL is enabled; it
> tries to look for BSD_PARTITION, which doesn't exist; this looks like
> it should be FREEBSD_PARTITION *or* NETBSD_PARTITION, or perhaps
> BSDI_PARTIION.
>
> Since I don't know BSD at all I don't know how to fix this, but it
> should either be fixed or the option taken out.

BSD_PARTITION is in include/linux/genhd.h and has been for some time. This
is the 2.1.132->132ac3 diff for the header file.

diff -u --new-file --recursive --exclude-from ../exclude linux.vanilla/include/linux/genhd.h linux.ac/include/linux/genhd.h
--- linux.vanilla/include/linux/genhd.h Sun Nov 8 15:06:47 1998
+++ linux.ac/include/linux/genhd.h Mon Dec 21 21:11:05 1998
@@ -108,12 +108,17 @@
#ifdef CONFIG_BSD_DISKLABEL
/*
* BSD disklabel support by Yossi Gottlieb <yogo@math.tau.ac.il>
+ * updated by Marc Espie <Marc.Espie@openbsd.org>
*/

+/* check against BSD src/sys/sys/disklabel.h for consistency */
+
#define BSD_PARTITION 0xa5 /* Partition ID */
+#define OPENBSD_PARTITION 0xa6

#define BSD_DISKMAGIC (0x82564557UL) /* The disk magic number */
#define BSD_MAXPARTITIONS 8
+#define OPENBSD_MAXPARTITIONS 16
#define BSD_FS_UNUSED 0 /* disklabel unused partition entry ID */
struct bsd_disklabel {
__u32 d_magic; /* the magic number */
@@ -159,6 +164,62 @@
};

#endif /* CONFIG_BSD_DISKLABEL */
+
+#ifdef CONFIG_UNIXWARE_DISKLABEL
+/*
+ * Unixware slices support by Andrzej Krzysztofowicz <ankry@mif.pg.gda.pl>
+ * and Krzysztof G. Baranowski <kgb@knm.org.pl>
+ */
+
+#define UNIXWARE_PARTITION 0x63 /* Partition ID, same as */
+ /* GNU_HURD and SCO Unix */
+#define UNIXWARE_DISKMAGIC (0xCA5E600DUL) /* The disk magic number */
+#define UNIXWARE_DISKMAGIC2 (0x600DDEEEUL) /* The slice table magic nr */
+#define UNIXWARE_NUMSLICE 16
+#define UNIXWARE_FS_UNUSED 0 /* Unused slice entry ID */
+
+struct unixware_slice {
+ __u16 s_label; /* label */
+ __u16 s_flags; /* permission flags */
+ __u32 start_sect; /* starting sector */
+ __u32 nr_sects; /* number of sectors in slice */
+};
+
+struct unixware_disklabel {
+ __u32 d_type; /* drive type */
+ __u32 d_magic; /* the magic number */
+ __u32 d_version; /* version number */
+ char d_serial[12]; /* serial number of the device */
+ __u32 d_ncylinders; /* # of data cylinders per device */
+ __u32 d_ntracks; /* # of tracks per cylinder */
+ __u32 d_nsectors; /* # of data sectors per track */
+ __u32 d_secsize; /* # of bytes per sector */
+ __u32 d_part_start; /* # of first sector of this partition */
+ __u32 d_unknown1[12]; /* ? */
+ __u32 d_alt_tbl; /* byte offset of alternate table */
+ __u32 d_alt_len; /* byte length of alternate table */
+ __u32 d_phys_cyl; /* # of physical cylinders per device */
+ __u32 d_phys_trk; /* # of physical tracks per cylinder */
+ __u32 d_phys_sec; /* # of physical sectors per track */
+ __u32 d_phys_bytes; /* # of physical bytes per sector */
+ __u32 d_unknown2; /* ? */
+ __u32 d_unknown3; /* ? */
+ __u32 d_pad[8]; /* pad */
+
+ struct unixware_vtoc {
+ __u32 v_magic; /* the magic number */
+ __u32 v_version; /* version number */
+ char v_name[8]; /* volume name */
+ __u16 v_nslices; /* # of slices */
+ __u16 v_unknown1; /* ? */
+ __u32 v_reserved[10]; /* reserved */
+ struct unixware_slice
+ v_slice[UNIXWARE_NUMSLICE]; /* slice headers */
+ } vtoc;
+
+}; /* 408 */
+
+#endif /* CONFIG_UNIXWARE_DISKLABEL */

extern struct gendisk *gendisk_head; /* linked list of disks */

-
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/