patch-2.4.0-test1 linux/fs/partitions/msdos.c
Next file: linux/fs/super.c
Previous file: linux/fs/partitions/check.c
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Wed May 24 08:40:41 2000
- Orig file:
v2.3.99-pre9/linux/fs/partitions/msdos.c
- Orig date:
Wed Apr 26 16:34:09 2000
diff -u --recursive --new-file v2.3.99-pre9/linux/fs/partitions/msdos.c linux/fs/partitions/msdos.c
@@ -27,9 +27,9 @@
#include <linux/string.h>
#include <linux/blk.h>
-#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD)
+#ifdef CONFIG_BLK_DEV_IDE
#include <linux/ide.h> /* IDE xlate */
-#endif /* (CONFIG_BLK_DEV_IDE) || (CONFIG_BLK_DEV_HD) */
+#endif /* CONFIG_BLK_DEV_IDE */
#include <asm/system.h>
@@ -350,19 +350,19 @@
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_HD)
+#ifdef CONFIG_BLK_DEV_IDE
int tested_for_xlate = 0;
read_mbr:
-#endif /* (CONFIG_BLK_DEV_IDE) || (CONFIG_BLK_DEV_HD) */
+#endif /* CONFIG_BLK_DEV_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_HD)
+#ifdef CONFIG_BLK_DEV_IDE
check_table:
-#endif /* (CONFIG_BLK_DEV_IDE) || (CONFIG_BLK_DEV_HD) */
+#endif /* CONFIG_BLK_DEV_IDE */
/* Use bforget(), because we may have changed the disk geometry */
if (*(unsigned short *) (0x1fe + data) != cpu_to_le16(MSDOS_LABEL_MAGIC)) {
bforget(bh);
@@ -370,7 +370,7 @@
}
p = (struct partition *) (0x1be + data);
-#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_HD)
+#ifdef CONFIG_BLK_DEV_IDE
if (!tested_for_xlate++) { /* Do this only once per disk */
/*
* Look for various forms of IDE disk geometry translation
@@ -426,7 +426,7 @@
(void) ide_xlate_1024(dev, 2, heads, " [PTBL]");
}
}
-#endif /* (CONFIG_BLK_DEV_IDE) || (CONFIG_BLK_DEV_HD) */
+#endif /* CONFIG_BLK_DEV_IDE */
/* Look for partitions in two passes:
First find the primary partitions, and the DOS-type extended partitions.
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)