diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-03-27 23:54:12 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-03-27 23:54:12 +0000 |
commit | d3e71cb08747743fce908122bab08b479eb403a5 (patch) | |
tree | cbec6948fdbdee9af81cf3ecfb504070d2745d7b /fs/partitions | |
parent | fe7ff1706e323d0e5ed83972960a1ecc1ee538b3 (diff) |
Merge with Linux 2.3.99-pre3.
Diffstat (limited to 'fs/partitions')
-rw-r--r-- | fs/partitions/msdos.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/fs/partitions/msdos.c b/fs/partitions/msdos.c index fc9555b77..21330f499 100644 --- a/fs/partitions/msdos.c +++ b/fs/partitions/msdos.c @@ -26,7 +26,10 @@ #include <linux/major.h> #include <linux/string.h> #include <linux/blk.h> + +#ifdef CONFIG_IDE #include <linux/ide.h> /* IDE xlate */ +#endif /* CONFIG_IDE */ #include <asm/system.h> @@ -347,19 +350,19 @@ int msdos_partition(struct gendisk *hd, kdev_t dev, unsigned char *data; int mask = (1 << hd->minor_shift) - 1; int sector_size = get_hardsect_size(dev) / 512; -#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) +#ifdef CONFIG_IDE int tested_for_xlate = 0; read_mbr: -#endif /* (CONFIG_BLK_DEV_IDE) || (CONFIG_BLK_DEV_IDE_MODULE) */ +#endif /* CONFIG_IDE */ if (!(bh = bread(dev,0,get_ptable_blocksize(dev)))) { if (warn_no_part) printk(" unable to read partition table\n"); return -1; } data = bh->b_data; -#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) +#ifdef CONFIG_IDE check_table: -#endif /* (CONFIG_BLK_DEV_IDE) || (CONFIG_BLK_DEV_IDE_MODULE) */ +#endif /* CONFIG_IDE */ /* Use bforget(), because we may have changed the disk geometry */ if (*(unsigned short *) (0x1fe + data) != cpu_to_le16(MSDOS_LABEL_MAGIC)) { bforget(bh); @@ -367,7 +370,7 @@ check_table: } p = (struct partition *) (0x1be + data); -#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) +#ifdef CONFIG_IDE if (!tested_for_xlate++) { /* Do this only once per disk */ /* * Look for various forms of IDE disk geometry translation @@ -423,7 +426,7 @@ check_table: (void) ide_xlate_1024(dev, 2, heads, " [PTBL]"); } } -#endif /* (CONFIG_BLK_DEV_IDE) || (CONFIG_BLK_DEV_IDE_MODULE) */ +#endif /* CONFIG_IDE */ /* Look for partitions in two passes: First find the primary partitions, and the DOS-type extended partitions. |