--- linux-2.5.7.orig/fs/partitions/msdos.c Tue Mar 19 07:37:04 2002 +++ linux-2.5.7/fs/partitions/msdos.c Wed Mar 20 22:25:31 2002 @@ -207,15 +207,13 @@ put_dev_sector(sect); } +#ifdef CONFIG_SOLARIS_X86_PARTITION /* james@bpgc.com: Solaris has a nasty indicator: 0x82 which also indicates linux swap. Be careful before believing this is Solaris. */ - static void solaris_x86_partition(struct gendisk *hd, struct block_device *bdev, int minor, int *current_minor) { - -#ifdef CONFIG_SOLARIS_X86_PARTITION long offset = hd->part[minor].start_sect; Sector sect; struct solaris_x86_vtoc *v; @@ -257,8 +255,8 @@ } put_dev_sector(sect); printk(" >\n"); -#endif } +#endif #ifdef CONFIG_BSD_DISKLABEL /* @@ -304,33 +302,34 @@ } #endif +#ifdef CONFIG_BSD_DISKLABEL static void bsd_partition(struct gendisk *hd, struct block_device *bdev, int minor, int *current_minor) { -#ifdef CONFIG_BSD_DISKLABEL do_bsd_partition(hd, bdev, minor, current_minor, "bsd", BSD_MAXPARTITIONS); -#endif } +#endif +#ifdef CONFIG_BSD_DISKLABEL static void netbsd_partition(struct gendisk *hd, struct block_device *bdev, int minor, int *current_minor) { -#ifdef CONFIG_BSD_DISKLABEL do_bsd_partition(hd, bdev, minor, current_minor, "netbsd", BSD_MAXPARTITIONS); -#endif } +#endif +#ifdef CONFIG_BSD_DISKLABEL static void openbsd_partition(struct gendisk *hd, struct block_device *bdev, int minor, int *current_minor) { -#ifdef CONFIG_BSD_DISKLABEL do_bsd_partition(hd, bdev, minor, current_minor, "openbsd", OPENBSD_MAXPARTITIONS); -#endif } +#endif +#ifdef CONFIG_UNIXWARE_DISKLABEL /* * Create devices for Unixware partitions listed in a disklabel, under a * dos-like partition. See extended_partition() for more information. @@ -338,7 +337,6 @@ static void unixware_partition(struct gendisk *hd, struct block_device *bdev, int minor, int *current_minor) { -#ifdef CONFIG_UNIXWARE_DISKLABEL long offset = hd->part[minor].start_sect; Sector sect; struct unixware_disklabel *l; @@ -370,9 +368,10 @@ } put_dev_sector(sect); printk(" >\n"); -#endif } +#endif +#ifdef CONFIG_MINIX_SUBPARTITION /* * Minix 2.0.0/2.0.2 subpartition support. * Anand Krishnamurthy @@ -381,7 +380,6 @@ static void minix_partition(struct gendisk *hd, struct block_device *bdev, int minor, int *current_minor) { -#ifdef CONFIG_MINIX_SUBPARTITION long offset = hd->part[minor].start_sect; Sector sect; unsigned char *data; @@ -416,19 +414,27 @@ printk(" >\n"); } put_dev_sector(sect); -#endif /* CONFIG_MINIX_SUBPARTITION */ } +#endif /* CONFIG_MINIX_SUBPARTITION */ static struct { unsigned char id; void (*parse)(struct gendisk *, struct block_device *, int, int *); } subtypes[] = { +#ifdef CONFIG_BSD_DISKLABEL {BSD_PARTITION, bsd_partition}, {NETBSD_PARTITION, netbsd_partition}, {OPENBSD_PARTITION, openbsd_partition}, +#endif +#ifdef CONFIG_MINIX_SUBPARTITION {MINIX_PARTITION, minix_partition}, +#endif +#ifdef CONFIG_UNIXWARE_DISKLABEL {UNIXWARE_PARTITION, unixware_partition}, +#endif +#ifdef CONFIG_SOLARIS_X86_PARTITION {SOLARIS_X86_PARTITION, solaris_x86_partition}, +#endif {0, NULL}, }; /*