dazuko-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dazuko-devel] devfs patch for linux 2.6 (2.0.1-pre2)


From: Gregory Hinton Nietsky
Subject: [Dazuko-devel] devfs patch for linux 2.6 (2.0.1-pre2)
Date: Fri, 26 Mar 2004 12:14:55 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040214

--- dazuko_linux26.c    Wed Mar 24 22:16:34 2004
+++ dazuko_linux26.c.greg       Fri Mar 26 12:09:41 2004
@@ -31,6 +31,10 @@
#include <linux/dcache.h>
#include <linux/mount.h>

+#ifdef CONFIG_DEVFS_FS
+#include <linux/devfs_fs_kernel.h>
+#endif
+
ssize_t linux_dazuko_device_read(struct file *, char __user *, size_t, loff_t *); ssize_t linux_dazuko_device_write(struct file *, const char __user *, size_t, loff_t *);
int linux_dazuko_device_open(struct inode *, struct file *);
@@ -605,7 +609,9 @@
       }

       /* initialization complete */
-
+#ifdef CONFIG_DEVFS_FS
+ devfs_mk_cdev(MKDEV(dev_major, 0), S_IFCHR | S_IRUSR | S_IWUSR,"%s",DEVICE_NAME);
+#endif
       return 0;
}

@@ -623,6 +629,10 @@
               mod_unreg_security(DEVICE_NAME, &dazuko_ops);
       else
               unregister_security(&dazuko_ops);
+
+#ifdef CONFIG_DEVFS_FS
+        devfs_remove("%s",DEVICE_NAME);
+#endif

       return 0;
}

--
This message has been scanned for viruses and
dangerous content by Network Sentry, and is
believed to be clean.
http://www.networksentry.co.za





reply via email to

[Prev in Thread] Current Thread [Next in Thread]