Re: Why do we need /dev

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

 



On Thu, Oct 12, 2006 at 09:55:21AM +0530, Jinesh K J wrote:
> On 10/11/06, Greg KH <greg@xxxxxxxxx> wrote:
> >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?
> No. I may do it sometime in future(I first have to find it).
> 
> >
> >> 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...)
> No, I was not talking about creating device files. Rather I prefer
> using binary attributes in the sysfs. If we can provide them with all
> the major file operations, then no need for any more device files.

What are you using binary attributes in sysfs for?  They are only to be
a pass-through from userspace to the hardware, with no interference by
the kernel itself.  Don't use sysfs binary attributes for anything else
or you will get yelled at by the sysfs maintainer :)

> >> 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?
> If no one really cares, then why can't we really remove such a thing
> completely from the system? This is my only concern.

Feel free to post patches to do this if you feel so strongly about it.

good luck,

greg k-h

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux