linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udev - question about current config format
@ 2004-01-09 14:21 Kay Sievers
  2004-01-10  1:30 ` Greg KH
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Kay Sievers @ 2004-01-09 14:21 UTC (permalink / raw)
  To: linux-hotplug

Hi Greg,
I want to ask if we shouldn't change the namedev logic and
make the rules generic and drop the different methods, cause
the name for the method is mostly redundant.
All what namedev does is applying a name when all device attributes
are matching. It's not neccessary to to tell namedev to REPLACE,
cause we always replace :)
And why shouldn't we be able to combine a SYSFS_ attribute with the
KERNEL name?


So here is a first idea:

  Every line in udev.rules consists only of a number of <key>="<value>"

    BUS           match with bus type
    SYSFS_<file>  match with device attribute
    ID/PLACE      match with bus "number" or "id"
    KERNEL        match with kernel device name
    RESULT        match with string returned by executed PROGRAM
    PROGRAM       program to execute (true if exec returned with 0)

    NAME          name for the device node
    SYMLINK       one or more symlinks to NAME

  The rules are processed in the order they are given in the file.
  Every configured KEY must match to apply the rule.
  It would be more flexible cause we may use all possible keys in a rule.
  It would be possible to exec the external program only for one specific
  device to get its name.
  We would be able to skip the expensive execution of the external
  program if one of the other keys doesn't match.

    KERNEL="video*", PROGRAM="script.sh", NAME="%c"
    SYSFS_model="V0815", PROGRAM="script.sh", NAME="%c"
    SYSFS_model="V0815", KERNEL="video*", NAME="video/%n"

Do we need a bus PLACE? In current udev it seems we have the same
processing for TOPOLOGY and NUMBER.


What do you think?
Do I miss something?

thanks,
Kay



-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
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] 8+ messages in thread

end of thread, other threads:[~2004-01-10  5:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-09 14:21 udev - question about current config format Kay Sievers
2004-01-10  1:30 ` Greg KH
2004-01-10  1:38 ` Kay Sievers
2004-01-10  3:52 ` Greg KH
2004-01-10  4:01 ` Kay Sievers
2004-01-10  4:03 ` Greg KH
2004-01-10  5:27 ` Kay Sievers
2004-01-10  5:39 ` Kay Sievers

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).