patches from the debian package
cdsymlinks_numeric: trivial fix, the variable is initialized to '', not 0
scsi_id_tmp: when udevstart is started, /tmp is not writeable.
I updated the rules files to the new style, and added support for devfs names for hardware RAID controllers.
Also, please remove etc/udev/debian/udev.permissions.
Signature · 2 lines
ciao, Marco
extras/cdsymlinks.sh +1 -1
@@ -159,7 +159,7 @@ output () { COUNT=$(($COUNT+1)) done # If the target dev ($1) is the current dev ($i), we output its name. - if test $(($NUMBERED_LINKS)) -ne 0 || test "$COUNT" -eq 0; then + if test $(($NUMBERED_LINKS)) -ne 0 || test "$COUNT" = ''; then test "$i" = "$1" && echo -n " $2$COUNT" fi # If the link isn't in our "existing links" list, add it and increment
extras/scsi_id/scsi_id.c +2 -2
@@ -44,8 +44,8 @@/* * temporary names for mknod. */ -#define TMP_DIR "/tmp" -#define TMP_PREFIX "scsi" +#define TMP_DIR "/dev" +#define TMP_PREFIX "tmp-scsi"/* * XXX Note the 'e' (send output to stderr in all cases), and 'c' (callout)
# There are a number of modifiers that are allowed to be used in some
# of the different fields. They provide the following subsitutions:
#
# %n the "kernel number" of the device.
# For example, 'sda3' has a "kernel number" of '3'
# %e the smallest number for that name which does not matches an existing node
# %k the kernel name for the device.
# %M the kernel major number for the device
# %m the kernel minor number for the device
# %b the bus id for the device
# %c the string returned by the PROGRAM
# %s{filename} the content of a sysfs attribute.
# %% the '%' char itself.
## default permissions for block devices
SUBSYSTEM="block", GROUP="disk"
SUBSYSTEM="block", SYSFS{removable}="1", GROUP="floppy"# workaround for devices which do not report media changes
BUS="ide", KERNEL="hd[a-z]", SYSFS{removable}="1", \
PROGRAM="/bin/cat /proc/ide/%k/model", RESULT="IOMEGA ZIP *", \
NAME{all_partitions}="%k%n", GROUP="floppy"# IDE devices
BUS="ide", KERNEL="hd[a-z]", SYSFS{removable}="1", \
PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom*", \
GROUP="cdrom"
BUS="ide", KERNEL="hd[a-z]", SYSFS{removable}="1", \
PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="floppy*", \
GROUP="floppy"
BUS="ide", KERNEL="ht[0-9]*", GROUP="tape"
BUS="ide", KERNEL="nht[0-9]*", GROUP="tape"
# SCSI devices
BUS="scsi", KERNEL="sr[0-9]*", SYSFS{type}="5", \
NAME="scd%n", SYMLINK="sr%n", GROUP="cdrom"
BUS="scsi", KERNEL="sg[0-9]*", SYSFS{type}="5", GROUP="cdrom"
BUS="scsi", KERNEL="st[0-9]*", GROUP="tape"
BUS="scsi", KERNEL="nst[0-9]*", GROUP="tape"
BUS="scsi", KERNEL="osst[0-9]*", GROUP="tape"
BUS="scsi", KERNEL="nosst[0-9]*", GROUP="tape"
# USB devices
BUS="usb", KERNEL="hiddev*", NAME="usb/%k"
BUS="usb", KERNEL="auer[0-9]*", NAME="usb/%k"
BUS="usb", KERNEL="legousbtower*", NAME="usb/%k", MODE="0666"
BUS="usb", KERNEL="dabusb*", NAME="usb/%k"
BUS="usb", KERNEL="cpad[0-9]*", NAME="usb/%k"
BUS="usb", KERNEL="ttyUSB*", SYSFS{product}="Palm Handheld*", SYMLINK="pilot"
# serial devices SUBSYSTEM="tty", GROUP="dialout" KERNEL="capi", NAME="capi20", SYMLINK="isdn/capi20" KERNEL="capi[0-9]*", NAME="capi/%n"
# vc devices KERNEL="ptmx", MODE="0666" KERNEL="tty", MODE="0666"
# video devices SUBSYSTEM="video4linux", GROUP="video" KERNEL="dvb*", PROGRAM="/etc/udev/scripts/dvb.sh %k", \ NAME="%c", GROUP="video" KERNEL="fb[0-9]*", GROUP="video" KERNEL="nvidia*", GROUP="video" KERNEL="card[0-9]*", NAME="dri/%k", GROUP="video"
# misc devices KERNEL="random", MODE="0666" KERNEL="urandom", MODE="0444" KERNEL="mem", MODE="0640", GROUP="kmem" KERNEL="kmem", MODE="0640", GROUP="kmem" KERNEL="port", MODE="0640", GROUP="kmem" KERNEL="full", MODE="0666" KERNEL="null", MODE="0666" KERNEL="zero", MODE="0666" KERNEL="inotify", MODE="0666" KERNEL="sgi_fetchop", MODE="0666" KERNEL="sonypi", MODE="0666" KERNEL="agpgart", GROUP="video" KERNEL="nvram", GROUP="nvram" KERNEL="rtc", MODE="0664", GROUP="audio" KERNEL="hw_random", NAME="hwrng"
# printers and parallel devices SUBSYSTEM="printer", GROUP="lp" BUS="usb", KERNEL="lp[0-9]*", NAME="usb/%k" KERNEL="pt[0-9]*", GROUP="tape" KERNEL="pht[0-9]*", GROUP="tape"
KERNEL="fd[0-9]*", GROUP="floppy"
KERNEL="cdemu[0-9]*", NAME="cdemu/%n", GROUP="cdrom"
KERNEL="pktcdvd[0-9]*", NAME="pktcdvd/%n", GROUP="cdrom"
KERNEL="pktcdvd", NAME="pktcdvd/control", MODE="0644"
KERNEL="cpu[0-9]*", NAME="cpu/%n/cpuid"
KERNEL="msr[0-9]*", NAME="cpu/%n/msr"
KERNEL="microcode", NAME="cpu/microcode"
KERNEL="umad*", NAME="infiniband/%k"
KERNEL="issm*", NAME="infiniband/%k"
KERNEL="tap[0-9]*", NAME="net/%k"
KERNEL="tun", NAME="net/%k"
# ALSA devices
SUBSYSTEM="sound", GROUP="audio"
KERNEL="controlC[0-9]*", NAME="snd/%k"
KERNEL="hwC[D0-9]*", NAME="snd/%k"
KERNEL="pcmC[D0-9cp]*", NAME="snd/%k"
KERNEL="midiC[D0-9]*", NAME="snd/%k"
KERNEL="timer", NAME="snd/%k"
KERNEL="seq", NAME="snd/%k"
# input devices KERNEL="mice", NAME="input/%k" KERNEL="mouse[0-9]*", NAME="input/%k" KERNEL="event[0-9]*", NAME="input/%k", \ PROGRAM="/etc/udev/scripts/inputdev.sh %k", RESULT="inputdev", \ MODE="0664", GROUP="video" KERNEL="event[0-9]*", NAME="input/%k" KERNEL="js[0-9]*", NAME="input/%k", MODE="0664" KERNEL="ts[0-9]*", NAME="input/%k" KERNEL="uinput", NAME="input/%k"
# Zaptel
KERNEL="zapctl", NAME="zap/ctl"
KERNEL="zaptimer", NAME="zap/timer"
KERNEL="zapchannel", NAME="zap/channel"
KERNEL="zappseudo", NAME="zap/pseudo"
KERNEL="zap[0-9]*", NAME="zap/%n"
# device mapper creates its own device nodes, so ignore these KERNEL="dm-[0-9]*", NAME="" KERNEL="device-mapper", NAME="mapper/control"
# There are a number of modifiers that are allowed to be used in some
# of the different fields. They provide the following subsitutions:
#
# %n the "kernel number" of the device.
# For example, 'sda3' has a "kernel number" of '3'
# %e the smallest number for that name which does not matches an existing node
# %k the kernel name for the device.
# %M the kernel major number for the device
# %m the kernel minor number for the device
# %b the bus id for the device
# %c the string returned by the PROGRAM
# %s{filename} the content of a sysfs attribute.
# %% the '%' char itself.
## default permissions for block devices
SUBSYSTEM="block", GROUP="disk"
SUBSYSTEM="block", SYSFS{removable}="1", GROUP="floppy"# workaround for devices which do not report media changes
BUS="ide", KERNEL="hd[a-z]", SYSFS{removable}="1", \
PROGRAM="/bin/cat /proc/ide/%k/model", RESULT="IOMEGA ZIP *", \
NAME{all_partitions}="%k%n", GROUP="floppy"# IDE devices
BUS="ide", KERNEL="hd[a-z]", SYSFS{removable}="1", \
PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom*", \
GROUP="cdrom"
BUS="ide", KERNEL="hd[a-z]", SYSFS{removable}="1", \
PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="floppy*", \
GROUP="floppy"
BUS="ide", KERNEL="hd[a-z]*", \
PROGRAM="/etc/udev/scripts/ide-devfs.sh %k %b %n", \
NAME="%c{1}", SYMLINK="%k %c{2}"
BUS="ide", KERNEL="ht[0-9]*", GROUP="tape"
BUS="ide", KERNEL="nht[0-9]*", GROUP="tape"
# SCSI devices
BUS="scsi", KERNEL="sd[a-z]", \
PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", \
NAME="%c{1}", SYMLINK="%k %c{2}"
BUS="scsi", KERNEL="sd[a-z][0-9]*", \
PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", \
NAME="%c{1}", SYMLINK="%k %c{2}"
BUS="scsi", KERNEL="sd[a-i][a-z]", \
PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", \
NAME="%c{1}", SYMLINK="%k %c{2}"
BUS="scsi", KERNEL="sd[a-i][a-z][0-9]*", \
PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", \
NAME="%c{1}", SYMLINK="%k %c{2}"
BUS="scsi", KERNEL="s[gr][0-9]*", SYSFS{type}="5", \
PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", \
NAME="%c{1}", SYMLINK="%k %c{2}", GROUP="cdrom"
BUS="scsi", KERNEL="sr[0-9]*", \
PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", \
NAME="%c{1}", SYMLINK="%k %c{2}", GROUP="cdrom"
BUS="scsi", KERNEL="sg[0-9]*", \
PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", \
NAME="%c{1}", SYMLINK="%k %c{2}"
BUS="scsi", KERNEL="st[0-9]*", \
PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", \
NAME="%c{1}", SYMLINK="%k %c{2}", GROUP="tape"
BUS="scsi", KERNEL="nst[0-9]*", \
PROGRAM="/etc/udev/scripts/scsi-devfs.sh %k %b %n", \
NAME="%c{1}", SYMLINK="%k %c{2}", GROUP="tape"
# RAID controllers
KERNEL="cciss!*", PROGRAM="/etc/udev/scripts/raid-devfs.sh %k", \
NAME="%c{1}", SYMLINK="%k"
KERNEL="ida!*", PROGRAM="/etc/udev/scripts/raid-devfs.sh %k", \
NAME="%c{1}", SYMLINK="%k"
KERNEL="rd!*", PROGRAM="/etc/udev/scripts/raid-devfs.sh %k", \
NAME="%c{1}", SYMLINK="%k"# other block devices KERNEL="md[0-9]*", NAME="md/%n", KERNEL="loop[0-9]*", NAME="loop/%n" KERNEL="ram[0-9]*", NAME="rd/%n"
# USB devices
BUS="usb", KERNEL="hiddev*", NAME="usb/%k"
BUS="usb", KERNEL="auer[0-9]*", NAME="usb/%k"
BUS="usb", KERNEL="legousbtower*", NAME="usb/%k", MODE="0666"
BUS="usb", KERNEL="dabusb*", NAME="usb/%k"
BUS="usb", KERNEL="cpad[0-9]*", NAME="usb/%k"
BUS="usb", KERNEL="ttyUSB*", SYSFS{product}="Palm Handheld*", SYMLINK="pilot"
# serial devices SUBSYSTEM="tty", GROUP="dialout" KERNEL="ttyS[0-9]*", NAME="tts/%n" KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n" KERNEL="rfcomm[0-9]*", NAME="bluetooth/rfcomm/%n", KERNEL="capi", NAME="capi20", SYMLINK="isdn/capi20" KERNEL="capi[0-9]*", NAME="capi/%n"
# vc devices KERNEL="ptmx", MODE="0666" KERNEL="tty", MODE="0666" KERNEL="tty[0-9]*", NAME="vc/%n" KERNEL="vcs", NAME="vcc/0" KERNEL="vcs[0-9]*", NAME="vcc/%n" KERNEL="vcsa", NAME="vcc/a0" KERNEL="vcsa[0-9]*", NAME="vcc/a%n"
# video devices SUBSYSTEM="video4linux", GROUP="video" KERNEL="video[0-9]*", NAME="v4l/%k" KERNEL="radio[0-9]*", NAME="v4l/%k" KERNEL="vbi[0-9]*", NAME="v4l/%k" KERNEL="vtx[0-9]*", NAME="v4l/%k" KERNEL="dvb*", PROGRAM="/etc/udev/scripts/dvb.sh %k", \ NAME="%c", GROUP="video" KERNEL="fb[0-9]*", NAME="fb/%n", GROUP="video" KERNEL="nvidia*", GROUP="video" KERNEL="card[0-9]*", NAME="dri/%k", GROUP="video"
# misc devices KERNEL="random", MODE="0666" KERNEL="urandom", MODE="0444" KERNEL="mem", MODE="0640", GROUP="kmem" KERNEL="kmem", MODE="0640", GROUP="kmem" KERNEL="port", MODE="0640", GROUP="kmem" KERNEL="full", MODE="0666" KERNEL="null", MODE="0666" KERNEL="zero", MODE="0666" KERNEL="inotify", MODE="0666" KERNEL="sgi_fetchop", MODE="0666" KERNEL="sonypi", MODE="0666" KERNEL="apm_bios", NAME="misc/%k", KERNEL="agpgart", NAME="misc/%k", GROUP="video" KERNEL="nvram", NAME="misc/%k", GROUP="nvram" KERNEL="psaux", NAME="misc/%k" KERNEL="rtc", NAME="misc/%k", MODE="0644", GROUP="audio" KERNEL="hw_random", NAME="hwrng"
# printers and parallel devices SUBSYSTEM="printer", GROUP="lp" BUS="usb", KERNEL="lp[0-9]*", NAME="usb/%k" KERNEL="lp[0-9]*", NAME="printers/%n" KERNEL="pt[0-9]*", GROUP="tape" KERNEL="pht[0-9]*", GROUP="tape"
KERNEL="i2c-[0-9]*", NAME="i2c/%n"
KERNEL="fd[0-9]*", NAME="floppy/%n", GROUP="floppy"
KERNEL="cdemu[0-9]*", NAME="cdemu/%n", GROUP="cdrom"
KERNEL="pktcdvd[0-9]*", NAME="pktcdvd/%n", GROUP="cdrom"
KERNEL="pktcdvd", NAME="pktcdvd/control", MODE="0644"
KERNEL="cpu[0-9]*", NAME="cpu/%n/cpuid"
KERNEL="msr[0-9]*", NAME="cpu/%n/msr"
KERNEL="microcode", NAME="cpu/microcode"
KERNEL="umad*", NAME="infiniband/%k"
KERNEL="issm*", NAME="infiniband/%k"
KERNEL="tap[0-9]*", NAME="net/%k"
KERNEL="tun", NAME="net/%k"
# sound devices SUBSYSTEM="sound", GROUP="audio" KERNEL="controlC[0-9]*", NAME="snd/%k" KERNEL="hwC[D0-9]*", NAME="snd/%k" KERNEL="pcmC[D0-9cp]*", NAME="snd/%k" KERNEL="midiC[D0-9]*", NAME="snd/%k" KERNEL="timer", NAME="snd/%k" KERNEL="seq", NAME="snd/%k" KERNEL="audio*", NAME="sound/%k" KERNEL="dsp*", NAME="sound/%k" KERNEL="adsp*", NAME="sound/%k" KERNEL="midi*", NAME="sound/%k" KERNEL="mixer*", NAME="sound/%k" KERNEL="sequencer*", NAME="sound/%k" KERNEL="amidi*", NAME="sound/%k" KERNEL="dmmidi*", NAME="sound/%k" KERNEL="admmidi*", NAME="sound/%k"
# input devices KERNEL="mice", NAME="input/%k" KERNEL="mouse[0-9]*", NAME="input/%k" KERNEL="event[0-9]*", NAME="input/%k", \ PROGRAM="/etc/udev/scripts/inputdev.sh %k", RESULT="inputdev", \ MODE="0664", GROUP="video" KERNEL="event[0-9]*", NAME="input/%k" KERNEL="js[0-9]*", NAME="input/%k", MODE="0664" KERNEL="ts[0-9]*", NAME="input/%k" KERNEL="uinput", NAME="input/%k"
# Zaptel
KERNEL="zapctl", NAME="zap/ctl"
KERNEL="zaptimer", NAME="zap/timer"
KERNEL="zapchannel", NAME="zap/channel"
KERNEL="zappseudo", NAME="zap/pseudo"
KERNEL="zap[0-9]*", NAME="zap/%n"
# device mapper creates its own device nodes, so ignore these KERNEL="dm-[0-9]*", NAME="" KERNEL="device-mapper", NAME="mapper/control"
Quoted 8 lines · Marco d'Itri
cdsymlinks_numeric: trivial fix, the variable is initialized to '', not 0
scsi_id_tmp: when udevstart is started, /tmp is not writeable.I updated the rules files to the new style, and added support for devfs names for hardware RAID controllers.
Also, please remove etc/udev/debian/udev.permissions.
Everything applied. You may check it here:
http://vrfy.bkbits.net:8080/udev/ChangeSet@-2d?nav=index.html
Thanks,
Kay
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Marco d'Itri
scsi_id_tmp: when udevstart is started, /tmp is not writeable.
What if /dev does not exist (udev_root modified) or perhaps not writable?
Does udev put temp files under /dev?
-- Patrick Mansfield
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 2 lines · Patrick Mansfield
Quoted 1 line
scsi_id_tmp: when udevstart is started, /tmp is not writeable.What if /dev does not exist (
udev_rootmodified) or perhaps not writable?
Good point, but I believe that this is a much more uncommon situation.
Quoted 1 line
Does udev put temp files under /dev?
Yes, the location for the udev database is defined in udev.conf.
Signature · 2 lines
ciao, Marco
Quoted 9 lines · Patrick Mansfield
Quoted 3 lines · Marco d'Itri
scsi_id_tmp: when udevstart is started, /tmp is not writeable.What if /dev does not exist (
udev_rootmodified) or perhaps not writable?Does udev put temp files under /dev?
Hmm, what about letting udev create the temporary node, instead of doing it in the *_id programs itself? That may be the best solution.
Something like:
PROGRAM="/sbin/scsi_id -d %N", ...
What do you think?
Thanks,
Kay
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 11 lines · Kay Sievers
Quoted 9 lines · Patrick Mansfield
Quoted 3 lines · Marco d'Itri
scsi_id_tmp: when udevstart is started, /tmp is not writeable.What if /dev does not exist (
udev_rootmodified) or perhaps not writable?Does udev put temp files under /dev?
Quoted 7 lines
Hmm, what about letting udev create the temporary node, instead of doing it in the
*_idprograms itself? That may be the best solution.Something like:
PROGRAM="/sbin/scsi_id -d %N", ...What do you think?
Yes, that would be nice.
scsi_id pre-dates the addition of any of the % code, and relies on the DEVPATH environment variable.
So it also needs code changes to use the DEVPATH plus any command line option, and/or a new % value for the sysfs path, like:
PROGRAM="scsi_id -d %N -s %p", ...
It should still figure out whether or not to print a trailing "\n" for normal command line usage. DEVPATH set could be the trigger, though that is not clean (using -s <devpath> for sysfs path, but then using DEVPATH to figure out if \n is printed).
-- Patrick Mansfield
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 22 lines · Patrick Mansfield
Quoted 11 lines · Kay Sievers
Quoted 9 lines · Patrick Mansfield
Quoted 3 lines · Marco d'Itri
scsi_id_tmp: when udevstart is started, /tmp is not writeable.What if /dev does not exist (
udev_rootmodified) or perhaps not writable?Does udev put temp files under /dev?
Quoted 7 lines
Hmm, what about letting udev create the temporary node, instead of doing it in the
*_idprograms itself? That may be the best solution.Something like:
PROGRAM="/sbin/scsi_id -d %N", ...What do you think?
Yes, that would be nice.
Quoted 7 lines
scsi_idpre-dates the addition of any of the % code, and relies on the DEVPATH environment variable.So it also needs code changes to use the DEVPATH plus any command line option, and/or a new % value for the sysfs path, like:
PROGRAM="scsi_id -d %N -s %p", ...
Ok, I did that. We have %N and %p now.
Quoted 4 lines
It should still figure out whether or not to print a trailing "\n" for normal command line usage. DEVPATH set could be the trigger, though that is not clean (using -s <devpath> for sysfs path, but then using DEVPATH to figure out if \n is printed).
RESULT does not care about a trailing \n.
Thanks,
Kay
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
[offlist]
Quoted 17 lines · Kay Sievers
Quoted 16 lines · Patrick Mansfield
Quoted 9 lines · Kay Sievers
On Sun, 2005-02-06 at 11:05 -0800, Patrick Mansfield wrote:
Hmm, what about letting udev create the temporary node, instead of doing it in the
*_idprograms itself? That may be the best solution.Something like:
PROGRAM="/sbin/scsi_id -d %N", ...What do you think?
Yes, that would be nice.
scsi_idpre-dates the addition of any of the % code, and relies on the DEVPATH environment variable.
Quoted 6 lines
Quoted 4 lines
So it also needs code changes to use the DEVPATH plus any command line option, and/or a new % value for the sysfs path, like:
PROGRAM="scsi_id -d %N -s %p", ...Ok, I did that. We have %N and %p now.
You can pull that into your tree:
bk pull bk://vrfy.bkbits.net/udev
if you are faster than Greg. :)
Cheers,
Kay
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · Kay Sievers
Quoted 4 lines · Patrick Mansfield
So it also needs code changes to use the DEVPATH plus any command line option, and/or a new % value for the sysfs path, like:
PROGRAM="scsi_id -d %N -s %p", ...
Quoted 8 lines
Ok, I did that. We will have %N and %p now.
Quoted 4 lines
It should still figure out whether or not to print a trailing "\n" for normal command line usage. DEVPATH set could be the trigger, though that is not clean (using -s <devpath> for sysfs path, but then using DEVPATH to figure out if \n is printed).
RESULT does not care about a trailing \n.
Okay. Then there is no change needed in scsi_id, and that code should be removed from it. I'm not sure if scsi_id DEVPATH environment variable usage should be removed (for backwards compatibility).
Given this change, can you revert the tmp directory change (if Marco's OK with that)? Mainly for non-udev command line usage.
Thanks ...
-- Patrick Mansfield
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 1 line · Kay Sievers
[offlist]
Hm, looks like it was on the list to me :)
Quoted 21 lines · Kay Sievers
Quoted 20 lines · Patrick Mansfield
Quoted 19 lines · Kay Sievers
Quoted 9 lines · Patrick Mansfield
Hmm, what about letting udev create the temporary node, instead of doing it in the
*_idprograms itself? That may be the best solution.Something like:
PROGRAM="/sbin/scsi_id -d %N", ...What do you think?
Yes, that would be nice.
scsi_idpre-dates the addition of any of the % code, and relies on the DEVPATH environment variable.So it also needs code changes to use the DEVPATH plus any command line option, and/or a new % value for the sysfs path, like:
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
PROGRAM="scsi_id -d %N -s %p", ...Ok, I did that. We have %N and %p now.
You can pull that into your tree:
bk pull bk://vrfy.bkbits.net/udevif you are faster than Greg. :)
I've pulled this into my tree and pushed it out now.
thanks,
greg k-h
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 4 lines · Greg KH
Quoted 1 line · Kay Sievers
[offlist]
Hm, looks like it was on the list to me :)
Yeah, bad. But it was harmless, puh. :)
Quoted 3 lines
Quoted 1 line
if you are faster than Greg. :)
I've pulled this into my tree and pushed it out now.
Wow, you were really fast. I will try it again sometimes, if it works to send private mails to the list for speedup :)
Kay
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 14 lines · Patrick Mansfield
Quoted 13 lines · Kay Sievers
Quoted 4 lines · Patrick Mansfield
So it also needs code changes to use the DEVPATH plus any command line option, and/or a new % value for the sysfs path, like:
PROGRAM="scsi_id -d %N -s %p", ...Ok, I did that. We will have %N and %p now.
Quoted 4 lines
It should still figure out whether or not to print a trailing "\n" for normal command line usage. DEVPATH set could be the trigger, though that is not clean (using -s <devpath> for sysfs path, but then using DEVPATH to figure out if \n is printed).
Quoted 5 lines
Quoted 1 line
RESULT does not care about a trailing \n.
Okay. Then there is no change needed in
scsi_id, and that code should be removed from it. I'm not sure ifscsi_idDEVPATH environment variable usage should be removed (for backwards compatibility).
I think that functionality it's not really needed outside of udev. But you still use it for vpd@page0 validation. You may compare that with inquiry@page0 instead of using the vendor/model values from sysfs?
Quoted 2 lines
Given this change, can you revert the tmp directory change (if Marco's OK with that)? Mainly for non-udev command line usage.
I will do that. Care to give it a try, if it really works with the new code. Also with the \n RESULT matching.
Thanks,
Kay
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 9 lines · Kay Sievers
Quoted 3 lines · Patrick Mansfield
Okay. Then there is no change needed in
scsi_id, and that code should be removed from it. I'm not sure ifscsi_idDEVPATH environment variable usage should be removed (for backwards compatibility).I think that functionality it's not really needed outside of udev. But you still use it for vpd@page0 validation. You may compare that with inquiry@page0 instead of using the vendor/model values from sysfs?
I'm not sure what you mean by the above. Can you clarify? Or does the following answer your question?
The DEVPATH usage and hotplug_mode are mainly for use with udev, the code is also there for ease of use in any hotplug program (though a script can easily run scsi_id -s ${DEVPATH}).
There are also some other oddities based on hotplug_mode being set (use syslog, don't warn on what would be errors for command line usage).
I get the vendor/model via sysfs as there are some quirks related to use of the INQUIRY and I did not want to duplicate that code or the devinfo list (black/white list, see drivers/scsi/scsi_scan.c and the scsi_devinfo.c table; especially the BLIST_INQUIRY_36 and 58).
In short scsi_inquiry() is always called with evpd set to 1.
Quoted 5 lines
Quoted 2 lines
Given this change, can you revert the tmp directory change (if Marco's OK with that)? Mainly for non-udev command line usage.
I will do that. Care to give it a try, if it really works with the new code. Also with the \n RESULT matching.
OK, I will test it out.
I still haven't tried building and running udev from source on my laptop (with FC3, better make sure I have a backup boot device).
-- Patrick Mansfield
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 18 lines · Patrick Mansfield
Quoted 9 lines · Kay Sievers
Quoted 3 lines · Patrick Mansfield
Okay. Then there is no change needed in
scsi_id, and that code should be removed from it. I'm not sure ifscsi_idDEVPATH environment variable usage should be removed (for backwards compatibility).I think that functionality it's not really needed outside of udev. But you still use it for vpd@page0 validation. You may compare that with inquiry@page0 instead of using the vendor/model values from sysfs?
I'm not sure what you mean by the above. Can you clarify? Or does the following answer your question?
The DEVPATH usage and
hotplug_modeare mainly for use with udev, the code is also there for ease of use in any hotplug program (though a script can easily runscsi_id-s ${DEVPATH}).
Quoted 7 lines
There are also some other oddities based on
hotplug_modebeing set (use syslog, don't warn on what would be errors for command line usage).I get the vendor/model via sysfs as there are some quirks related to use of the INQUIRY and I did not want to duplicate that code or the devinfo list (black/white list, see
drivers/scsi/scsi_scan.cand thescsi_devinfo.ctable; especially theBLIST_INQUIRY_36and 58).
I was just asking if a compare between the results of page0 vpd=0 and vpd=1 would be sufficient to make sure that the right page0 is returned. And we wouldn't need the devpath at all.
I see the reason now. Well, I like broken hardware. :)
Thanks,
Kay
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel