[EMAIL PROTECTED] (Claus-Justus Heine) writes:
> News
> ====
>
> -- Make sure the whole stuff compiles with kernels up to 2.4.0
> [...]
> -- `devfs' support for kernels which support it.
Unfortunately, the interface to devfs changed in 2.4.0-test3, and so
ftape-4.03 does not compile against it (or -test4).
Here is a patch which attempts to fix it. I haven't tried it, as the
2.4.0-test4 kernel doesn't actually compile for me :-(
It isn't strictly correct, as it won't compile for 2.4.0-test1 and -test2,
but they can't be distinguished at compile time.
The joys of the bleeding edge...
--- ftape/zftape/zftape-init.c~ Mon Jul 17 19:20:50 2000
+++ ftape/zftape/zftape-init.c Mon Jul 17 19:27:16 2000
@@ -431,9 +431,15 @@
sprintf(tmpname, "%s%d", name, sel);
sprintf(tmpname1, "ftape/%d/%s", sel, name);
+#if LINUX_VERSION_CODE < KERNEL_VER(2,4,0)
devfs_mk_symlink(NULL, tmpname,
0, DEVFS_FL_DEFAULT,
tmpname1, 0, NULL, NULL);
+#else
+ devfs_mk_symlink(NULL, tmpname,
+ DEVFS_FL_DEFAULT,
+ tmpname1, NULL, NULL);
+#endif
}
# ifdef MODULE
@@ -442,7 +448,11 @@
char tmpname[40];
sprintf(tmpname, "%s%d", name, sel);
+#if LINUX_VERSION_CODE < KERNEL_VER(2,4,0)
devfs_unregister(devfs_find_handle(NULL, tmpname, 0, 0, 0, 0, 0));
+#else
+ devfs_unregister(devfs_find_handle(NULL, tmpname, 0, 0, 0, 0));
+#endif
}
# endif
#else
@@ -463,14 +473,23 @@
TRACE_CATCH(devfs_register_chrdev(ft_major_device_number,
"zft", &zft_cdev),);
+#if LINUX_VERSION_CODE < KERNEL_VER(2,4,0)
ftape_devfs_handle = devfs_mk_dir(NULL, "ftape", 0, NULL);
+#else
+ ftape_devfs_handle = devfs_mk_dir(NULL, "ftape", NULL);
+#endif
for (sel = 0; sel < 4; sel++) {
char tmpname[40];
sprintf(tmpname, "%d", sel);
+#if LINUX_VERSION_CODE < KERNEL_VER(2,4,0)
devfs_handle[sel] = devfs_mk_dir(ftape_devfs_handle,
tmpname, 0, NULL);
+#else
+ devfs_handle[sel] = devfs_mk_dir(ftape_devfs_handle,
+ tmpname, NULL);
+#endif
devfs_q[sel] = devfs_register(devfs_handle[sel], "qft",
DEVFS_FL_DEFAULT,
--
`O O' | [EMAIL PROTECTED]
// ^ \\ | http://www.pyrites.org.uk/