On Tue, 2008-02-19 at 11:13 +0200, Dan Shimshoni wrote: > Hi, > > Is there a way I can test, from a kernel module, the existence of a > device file ? > A kernel module I write is a character device module, which depends > on getting ioctls. In order that it will work, "mknod ... /dev/myDev" > should be issued before to create the device file. > > Is there a way to check, in the init() method of this module, the > existence of /dev/myDev (and exit with a proper printk if /dev/myDev > does not exist)? > > DS >
.. It is possible, but it'll be as ugly as it gets. As others already pointed out, udev should create the device for you. (Or in short, don't do it) Never the less, you should be able to filp_opep/filp_close to check if the device node exists. - Gilboa ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]