From: Andries Brouwer <aebr@win.tue.nl>
To: James Simmons <jsimmons@infradead.org>
Cc: Greg KH <greg@kroah.com>,
linux-hotplug-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: HOWTO use udev to manage /dev
Date: Fri, 20 Feb 2004 01:52:37 +0100 [thread overview]
Message-ID: <20040220005237.GA7079@pclin040.win.tue.nl> (raw)
In-Reply-To: <Pine.LNX.4.44.0402192020100.26894-100000@phoenix.infradead.org>
On Thu, Feb 19, 2004 at 08:21:25PM +0000, James Simmons wrote:
> Okay. If I change the major number of serial ttys inside the kernel
> of course udev would properly handle this. Now the question is would this
> break userland applications using the serial port?
Yes, a few of them.
Ordinarily, userland software uses pathnames in /dev.
But some software knows too much.
In dietlibc-0.20 one can read:
char *ttyname(int fd) {
...
if (S_ISCHR(s.st_mode)) {
n=minor(s.st_rdev);
switch (major(s.st_rdev)) {
case 4:
...
case 2:
...
case 136:
case 137:
case 138:
case 139:
...
}
This code knows about the actual values of majors.
There are lots of examples like this.
For stable use of Linux one must preserve the 16-bit legacy area.
On the other hand, if the goal is to find and eradicate all such
ugly uses of explicit device numbers, Linus' idea to make it all
random will certainly help.
(But a big grep for st_rdev might be more efficient.)
Andries
next prev parent reply other threads:[~2004-02-20 1:07 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-19 18:59 [ANNOUNCE] udev 018 release Greg KH
2004-02-19 19:13 ` Greg KH
2004-02-20 12:48 ` Michael Buesch
2004-02-20 23:56 ` Greg KH
2004-02-19 19:16 ` HOWTO use udev to manage /dev Greg KH
2004-02-19 19:36 ` James Simmons
2004-02-19 19:46 ` Greg KH
2004-02-19 20:21 ` James Simmons
2004-02-19 20:28 ` Greg KH
2004-02-19 21:35 ` James Simmons
2004-02-20 0:52 ` Andries Brouwer [this message]
2004-02-20 19:14 ` Johannes Stezenbach
2004-02-20 23:57 ` Greg KH
2004-02-19 22:22 ` Frédéric L. W. Meunier
2004-02-19 22:25 ` Frédéric L. W. Meunier
2004-02-19 23:07 ` Greg KH
2004-02-19 23:46 ` Frédéric L. W. Meunier
2004-02-19 23:56 ` Greg KH
2004-02-20 0:51 ` Frédéric L. W. Meunier
2004-02-20 1:09 ` Frédéric L. W. Meunier
2004-02-20 1:54 ` Greg KH
2004-02-20 2:28 ` Frédéric L. W. Meunier
2004-02-20 7:44 ` Frédéric L. W. Meunier
2004-02-20 1:20 ` Tomasz Torcz
2004-02-21 17:20 ` [ANNOUNCE] udev 018 release Prakash K. Cheemplavam
2004-02-24 1:49 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040220005237.GA7079@pclin040.win.tue.nl \
--to=aebr@win.tue.nl \
--cc=greg@kroah.com \
--cc=jsimmons@infradead.org \
--cc=linux-hotplug-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®