tag 390257 patch
thanks

Here's a patch for 0.7.  Maybe also works for 8.x.  It is only known to build
(didn't try it in runtime).

-- 
Robert Millan

ACK STORM, S.L.  -  http://www.ackstorm.es/
diff -ur drivers/block/drbd.old/drbd_main.c drivers/block/drbd/drbd_main.c
--- drivers/block/drbd.old/drbd_main.c  2006-10-13 13:51:53.000000000 +0200
+++ drivers/block/drbd/drbd_main.c      2006-10-13 13:52:48.000000000 +0200
@@ -49,7 +49,6 @@
 #include <linux/mm_inline.h>
 #endif
 #include <linux/slab.h>
-#include <linux/devfs_fs_kernel.h>
 
 #define __KERNEL_SYSCALLS__
 #include <linux/unistd.h>
@@ -144,8 +143,10 @@
 #endif
 int disable_bd_claim = 0;
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
 // devfs name
 char* drbd_devfs_name = "drbd";
+#endif
 
 
 // global panic flag
@@ -1694,7 +1695,7 @@
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
        devfs_unregister(devfs_handle);
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
        devfs_remove(drbd_devfs_name);
 #endif
 
@@ -1769,7 +1770,9 @@
                return err;
        }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
        drbd_devfs_name = (major_nr == NBD_MAJOR) ? "nbd" : "drbd";
+#endif
 
        /*
         * allocate all necessary structs
@@ -1791,7 +1794,9 @@
        if (unlikely(!drbd_blocksizes)) goto Enomem;
 #else
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
        devfs_mk_dir(drbd_devfs_name);
+#endif
 
        for (i = 0; i < minor_count; i++) {
                drbd_dev    *mdev = drbd_conf + i;
@@ -1814,7 +1819,9 @@
                disk->first_minor = i;
                disk->fops = &drbd_ops;
                sprintf(disk->disk_name, DEVICE_NAME "%d", i);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
                sprintf(disk->devfs_name, "%s/%d", drbd_devfs_name, i);
+#endif
                disk->private_data = mdev;
                add_disk(disk);
 

Reply via email to