* shouldn't device names be "standardized"?
@ 2004-11-07 16:56 Kevan Rehm
2004-11-07 17:20 ` Marco d'Itri
0 siblings, 1 reply; 2+ messages in thread
From: Kevan Rehm @ 2004-11-07 16:56 UTC (permalink / raw)
To: linux-hotplug
Greetings,
Something that confuses me about udev.rules is the tremendous
flexibility possible in producing device names. It seems more of a
curse than a blessing to me, so I must be missing something. Could
someone please provide some insight?
On our brand-new SLES9 machine, I was writing a udev rule to produce
tape device pathnames that have the same persistent format as the device
names our software app already uses on SGI IRIX systems, so that the app
could use common code for both systems. When I went to add the rule, I
discovered that there was a /sbin/udev.get_persistent_device_name.sh
rule already in place that generates persistent disk and tape device
names using both hardware paths and vendor/product/serialno paths.
These names are incompatible with the names that we currently use.
Other machines I have logged into don't appear to have this
udev.get_persistent_device_name.sh installed.
Which got me to thinking. If I add my rule to make my application work,
then what other applications am I breaking who depend upon the rule
already in place, or who depend upon having no rule in place at all,
e.g.who expect traditional. /dev/st0 names?
How does one write a software application that will run correctly on 2.6
Linux kernels everywhere when different machines will have different
udev.rules pathname conventions in place? The only thing I could think
of was to parse the sysfs tree to find the devices I want, then
recursively scan /dev looking for devices with matching major/minor
values in order to come up with the correct device names to use. That
seems like a lot of work!
Then I thought that maybe udev processes ALL matching rules, and so it
would produce names for each inserted rule plus the default rule and
then everyone would be happy, but this doesn't appear to be the case
(unless I misunderstand). Besides, there could still be collisions
between the names generated by different rules.
So it seems to me that it would be better to have some sort of standard
name for devices, sort of like the Linux Filesystem Hierarchy Standard,
where there are names that an application could trust would be present
on any Linux box it would care to run on.
Obviously you-all have already thought of this, so could someone
enlighten me? What am I missing?
Thanks very much,
Kevan Rehm
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id\x12065&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: shouldn't device names be "standardized"?
2004-11-07 16:56 shouldn't device names be "standardized"? Kevan Rehm
@ 2004-11-07 17:20 ` Marco d'Itri
0 siblings, 0 replies; 2+ messages in thread
From: Marco d'Itri @ 2004-11-07 17:20 UTC (permalink / raw)
To: linux-hotplug
On Nov 07, Kevan Rehm <kfr@sgi.com> wrote:
> Then I thought that maybe udev processes ALL matching rules, and so it
> would produce names for each inserted rule plus the default rule and
> then everyone would be happy, but this doesn't appear to be the case
> (unless I misunderstand). Besides, there could still be collisions
Yes. I think distributions should take some care with scripts which
generate custom names, only use them to create symlinks (which can be
provided by multiple rules) and always provide the standard names.
Or at least, this is what I do in the debian package and so far looks
like I have not annoyed too many users.
> So it seems to me that it would be better to have some sort of standard
> name for devices, sort of like the Linux Filesystem Hierarchy Standard,
> where there are names that an application could trust would be present
> on any Linux box it would care to run on.
We do: http://www.lanana.org/docs/device-list/index.html .
--
ciao, |
Marco | [9037 os/gINppPck0w]
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id\x12065&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-11-07 17:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-07 16:56 shouldn't device names be "standardized"? Kevan Rehm
2004-11-07 17:20 ` Marco d'Itri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).