On Sat, Oct 12, 2002 at 10:24:03PM +0200, Etay Meiri wrote: > Hi, > > I'm writing a character device module and > I've implemented an open function that is called > when someone opens the corresponding device file. > How can I get, from within my 'open' function > the minor number of the specific device of that call? The minor number can be found by doing: devnum = minor(inode->i_rdev); on the inode passed to your open call. I think on 2.2 and 2.4, the minor function is all caps (like MINOR). Hope this helps, greg k-h -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/