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

Re: Why do we need /dev



On Wed, Oct 11, 2006 at 09:48:31AM +0530, Jinesh K J wrote:
> On 10/10/06, Raseel Bhagat <raseelbhagat@xxxxxxxxx> wrote:
> >It was always possible to assign major device numbers dynamically.
> >I think what Jinesh wants to point out that , the parameer _dev itself
> >should not be used by driver developers.
> >It is something that should be obvious for the developer and treated
> >as a black-box , so to speak.
> Yes, Exactly!
> 
> >
> >So is POSIX compiancy the ONLY reason the major and minor numebrs are 
> >present  ?
> >
> This is what I'm also wondering. Does POSIX say that there need to be
> major and minor numbers - if it doesn't, then there's no problem in
> shifting towards a blackbox concept for it.

Have you looked at the spec?

> Even if POSIX insists upon having device files in /dev, may be what we
> can do is that we can keep symbolic links inside the directory. The
> links may point to some entry in sysfs. I think managing symbolic
> links would be easier for udev than to create device nodes.

No, we will never create device nodes in sysfs, please see the
linux-kernel archives for the many times this has come up over the years
for all the details as to why not (think naming and permission
issues...)

> But if the POSIX insists upon having device files with major,minor
> numbers in /dev directory, then I'm sorry for coining this idea. May
> be we have to wait some time till POSIX gets a revision.

Heh, you have to be kidding, I don't think that will ever happen.

And again, what's the big deal with a major/minor number issue?  Drivers
deal with them very little, and userspace also doesn't really use them
much, if at all.  So why do they bother you?

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/