On Tue, Jan 20, 2004 at 01:45:03PM -0700, Liberty Young wrote: > On Tue, 2004-01-20 at 13:28, Greg KH wrote: > > On Tue, Jan 20, 2004 at 01:16:41PM -0700, Liberty Young wrote: > > > > > > But the kernel doesn't print out the expected results! What am i doing wrong? > > > > Relying on devfs being enabled is the main problem :) > > > > Just use the minor number in the inode on open to determine which > > structure in your driver is being accessed. Then set the private > > pointer in the struct file to this value. That can then be used on all > > future read(), write(), and release() calls. > > > > Relying on devfs being enabled is pretty much okay, as this driver is > more internal and we're using devfs...but point taken. I think to solve > _this_ problem, i'll do just that. You are aware of the current issues with devfs, right? Ok, it's your kernel... :) > That aside, I'm interested in why i can't set the void *private argument > to a default value in open() and other related calls. You are supposed to set it in your open() call, for use in all other related calls. Or am I misunderstanding your question here? thanks, greg k-h -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/