[PATCH] Andre's IDE Patch (6/7)

From: Rob Radez (rob@osinvestor.com)
Date: Sat Jan 19 2002 - 16:59:08 EST


This is the sixth of seven patches against 2.4.18-pre4, beginning the breakup
of Andre Hedrick's IDE patch into smaller chunks.

Description of patch 6:
This patch touches two files, fs/partitions/Makefile and
fs/partitions/msdos.c. This was compile tested but not booted. The Makefile
is simply patched to add msdos.o to the export-objs list, while msdos.c is
changed to work when IDE is modularized.

Regards,
Rob Radez

diff -ruN linux-2.4.18-pre3/fs/partitions/Makefile linux-2.4.18-pre3-ide-rr/fs/partitions/Makefile
--- linux-2.4.18-pre3/fs/partitions/Makefile Thu Jul 26 19:30:04 2001
+++ linux-2.4.18-pre3-ide-rr/fs/partitions/Makefile Mon Jan 14 18:28:53 2002
@@ -9,7 +9,7 @@

 O_TARGET := partitions.o

-export-objs := check.o ibm.o
+export-objs := check.o ibm.o msdos.o

 obj-y := check.o

diff -ruN linux-2.4.18-pre3/fs/partitions/msdos.c linux-2.4.18-pre3-ide-rr/fs/partitions/msdos.c
--- linux-2.4.18-pre3/fs/partitions/msdos.c Thu Oct 11 11:07:07 2001
+++ linux-2.4.18-pre3-ide-rr/fs/partitions/msdos.c Mon Jan 14 18:28:53 2002
@@ -29,7 +29,13 @@

 #ifdef CONFIG_BLK_DEV_IDE
 #include <linux/ide.h> /* IDE xlate */
-#endif /* CONFIG_BLK_DEV_IDE */
+#elif defined(CONFIG_BLK_DEV_IDE_MODULE)
+#include <linux/module.h>
+
+int (*ide_xlate_1024_hook)(kdev_t, int, int, const char *);
+EXPORT_SYMBOL(ide_xlate_1024_hook);
+#define ide_xlate_1024 ide_xlate_1024_hook
+#endif

 #include <asm/system.h>

@@ -468,7 +474,7 @@
  */
 static int handle_ide_mess(struct block_device *bdev)
 {
-#ifdef CONFIG_BLK_DEV_IDE
+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
         Sector sect;
         unsigned char *data;
         kdev_t dev = to_kdev_t(bdev->bd_dev);
@@ -476,6 +482,10 @@
         int heads = 0;
         struct partition *p;
         int i;
+#ifdef CONFIG_BLK_DEV_IDE_MODULE
+ if (!ide_xlate_1024)
+ return 1;
+#endif
         /*
          * The i386 partition handling programs very often
          * make partitions end on cylinder boundaries.
@@ -537,7 +547,7 @@
         /* Flush the cache */
         invalidate_bdev(bdev, 1);
         truncate_inode_pages(bdev->bd_inode->i_mapping, 0);
-#endif /* CONFIG_BLK_DEV_IDE */
+#endif /* defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) */
         return 1;
 }

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



This archive was generated by hypermail 2b29 : Wed Jan 23 2002 - 21:00:34 EST