* patches from the debian package
@ 2005-02-05 15:50 Marco d'Itri
2005-02-05 16:14 ` Kay Sievers
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: Marco d'Itri @ 2005-02-05 15:50 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 320 bytes --]
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.
--
ciao,
Marco
[-- Attachment #2: cdsymlinks_numeric --]
[-- Type: text/plain, Size: 635 bytes --]
diff -ruNp udev-050.orig/extras/cdsymlinks.sh udev-050/extras/cdsymlinks.sh
--- udev-050.orig/extras/cdsymlinks.sh 2004-12-18 06:53:07.000000000 +0100
+++ udev-050/extras/cdsymlinks.sh 2005-01-18 18:44:07.000000000 +0100
@@ -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
[-- Attachment #3: scsi_id_tmp --]
[-- Type: text/plain, Size: 484 bytes --]
diff -ruNp udev-050.orig/extras/scsi_id/scsi_id.c udev-050/extras/scsi_id/scsi_id.c
--- udev-050.orig/extras/scsi_id/scsi_id.c 2004-12-18 06:53:07.000000000 +0100
+++ udev-050/extras/scsi_id/scsi_id.c 2005-01-01 22:19:15.000000000 +0100
@@ -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)
[-- Attachment #4: udev.rules --]
[-- Type: text/plain, Size: 4679 bytes --]
# 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"
[-- Attachment #5: devfs.rules --]
[-- Type: text/plain, Size: 6950 bytes --]
# 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"
[-- Attachment #6: raid-devfs.sh --]
[-- Type: application/x-sh, Size: 1218 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: patches from the debian package
2005-02-05 15:50 patches from the debian package Marco d'Itri
@ 2005-02-05 16:14 ` Kay Sievers
2005-02-06 19:05 ` Patrick Mansfield
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Kay Sievers @ 2005-02-05 16:14 UTC (permalink / raw)
To: linux-hotplug
On Sat, 2005-02-05 at 16:50 +0100, Marco d'Itri wrote:
> 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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: patches from the debian package
2005-02-05 15:50 patches from the debian package Marco d'Itri
2005-02-05 16:14 ` Kay Sievers
@ 2005-02-06 19:05 ` Patrick Mansfield
2005-02-06 19:16 ` Marco d'Itri
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Patrick Mansfield @ 2005-02-06 19:05 UTC (permalink / raw)
To: linux-hotplug
On Sat, Feb 05, 2005 at 04:50:31PM +0100, Marco d'Itri wrote:
>
> 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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: patches from the debian package
2005-02-05 15:50 patches from the debian package Marco d'Itri
2005-02-05 16:14 ` Kay Sievers
2005-02-06 19:05 ` Patrick Mansfield
@ 2005-02-06 19:16 ` Marco d'Itri
2005-02-06 23:13 ` Kay Sievers
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Marco d'Itri @ 2005-02-06 19:16 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 406 bytes --]
On Feb 06, Patrick Mansfield <patmans@us.ibm.com> wrote:
> > scsi_id_tmp: when udevstart is started, /tmp is not writeable.
> What if /dev does not exist (udev_root modified) or perhaps not writable?
Good point, but I believe that this is a much more uncommon situation.
> Does udev put temp files under /dev?
Yes, the location for the udev database is defined in udev.conf.
--
ciao,
Marco
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: patches from the debian package
2005-02-05 15:50 patches from the debian package Marco d'Itri
` (2 preceding siblings ...)
2005-02-06 19:16 ` Marco d'Itri
@ 2005-02-06 23:13 ` Kay Sievers
2005-02-07 18:39 ` Patrick Mansfield
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Kay Sievers @ 2005-02-06 23:13 UTC (permalink / raw)
To: linux-hotplug
On Sun, 2005-02-06 at 11:05 -0800, Patrick Mansfield wrote:
> On Sat, Feb 05, 2005 at 04:50:31PM +0100, Marco d'Itri wrote:
>
> >
> > 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?
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
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: patches from the debian package
2005-02-05 15:50 patches from the debian package Marco d'Itri
` (3 preceding siblings ...)
2005-02-06 23:13 ` Kay Sievers
@ 2005-02-07 18:39 ` Patrick Mansfield
2005-02-08 19:50 ` Kay Sievers
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Patrick Mansfield @ 2005-02-07 18:39 UTC (permalink / raw)
To: linux-hotplug
On Mon, Feb 07, 2005 at 12:13:09AM +0100, Kay Sievers wrote:
> On Sun, 2005-02-06 at 11:05 -0800, Patrick Mansfield wrote:
> > On Sat, Feb 05, 2005 at 04:50:31PM +0100, Marco d'Itri wrote:
> >
> > >
> > > 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?
>
> 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?
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_id\x14396&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] 14+ messages in thread
* Re: patches from the debian package
2005-02-05 15:50 patches from the debian package Marco d'Itri
` (4 preceding siblings ...)
2005-02-07 18:39 ` Patrick Mansfield
@ 2005-02-08 19:50 ` Kay Sievers
2005-02-08 19:52 ` Kay Sievers
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Kay Sievers @ 2005-02-08 19:50 UTC (permalink / raw)
To: linux-hotplug
On Mon, 2005-02-07 at 10:39 -0800, Patrick Mansfield wrote:
> On Mon, Feb 07, 2005 at 12:13:09AM +0100, Kay Sievers wrote:
> > On Sun, 2005-02-06 at 11:05 -0800, Patrick Mansfield wrote:
> > > On Sat, Feb 05, 2005 at 04:50:31PM +0100, Marco d'Itri wrote:
> > >
> > > >
> > > > 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?
> >
> > 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?
>
> 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", ...
Ok, I did that. We have %N and %p now.
> 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_id\x14396&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] 14+ messages in thread
* Re: patches from the debian package
2005-02-05 15:50 patches from the debian package Marco d'Itri
` (5 preceding siblings ...)
2005-02-08 19:50 ` Kay Sievers
@ 2005-02-08 19:52 ` Kay Sievers
2005-02-08 20:11 ` Patrick Mansfield
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Kay Sievers @ 2005-02-08 19:52 UTC (permalink / raw)
To: linux-hotplug
[offlist]
On Tue, 2005-02-08 at 20:50 +0100, Kay Sievers wrote:
> On Mon, 2005-02-07 at 10:39 -0800, Patrick Mansfield wrote:
> > On Mon, Feb 07, 2005 at 12:13:09AM +0100, Kay Sievers wrote:
> > > 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 *_id programs 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", ...
>
> 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_id\x14396&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] 14+ messages in thread
* Re: patches from the debian package
2005-02-05 15:50 patches from the debian package Marco d'Itri
` (6 preceding siblings ...)
2005-02-08 19:52 ` Kay Sievers
@ 2005-02-08 20:11 ` Patrick Mansfield
2005-02-08 20:15 ` Greg KH
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Patrick Mansfield @ 2005-02-08 20:11 UTC (permalink / raw)
To: linux-hotplug
On Tue, Feb 08, 2005 at 08:50:10PM +0100, Kay Sievers wrote:
> On Mon, 2005-02-07 at 10:39 -0800, Patrick Mansfield wrote:
> > 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.
> > 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_id\x14396&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] 14+ messages in thread
* Re: patches from the debian package
2005-02-05 15:50 patches from the debian package Marco d'Itri
` (7 preceding siblings ...)
2005-02-08 20:11 ` Patrick Mansfield
@ 2005-02-08 20:15 ` Greg KH
2005-02-08 20:26 ` Kay Sievers
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Greg KH @ 2005-02-08 20:15 UTC (permalink / raw)
To: linux-hotplug
On Tue, Feb 08, 2005 at 08:52:29PM +0100, Kay Sievers wrote:
> [offlist]
Hm, looks like it was on the list to me :)
> On Tue, 2005-02-08 at 20:50 +0100, Kay Sievers wrote:
> > On Mon, 2005-02-07 at 10:39 -0800, Patrick Mansfield wrote:
> > > On Mon, Feb 07, 2005 at 12:13:09AM +0100, Kay Sievers wrote:
> > > > 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 *_id programs 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", ...
> >
> > 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. :)
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_id\x14396&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] 14+ messages in thread
* Re: patches from the debian package
2005-02-05 15:50 patches from the debian package Marco d'Itri
` (8 preceding siblings ...)
2005-02-08 20:15 ` Greg KH
@ 2005-02-08 20:26 ` Kay Sievers
2005-02-08 20:38 ` Kay Sievers
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: Kay Sievers @ 2005-02-08 20:26 UTC (permalink / raw)
To: linux-hotplug
On Tue, 2005-02-08 at 12:15 -0800, Greg KH wrote:
> On Tue, Feb 08, 2005 at 08:52:29PM +0100, Kay Sievers wrote:
> > [offlist]
>
> Hm, looks like it was on the list to me :)
Yeah, bad. But it was harmless, puh. :)
> > 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_id\x14396&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] 14+ messages in thread
* Re: patches from the debian package
2005-02-05 15:50 patches from the debian package Marco d'Itri
` (9 preceding siblings ...)
2005-02-08 20:26 ` Kay Sievers
@ 2005-02-08 20:38 ` Kay Sievers
2005-02-08 21:32 ` Patrick Mansfield
2005-02-08 21:59 ` Kay Sievers
12 siblings, 0 replies; 14+ messages in thread
From: Kay Sievers @ 2005-02-08 20:38 UTC (permalink / raw)
To: linux-hotplug
On Tue, 2005-02-08 at 12:11 -0800, Patrick Mansfield wrote:
> On Tue, Feb 08, 2005 at 08:50:10PM +0100, Kay Sievers wrote:
> > On Mon, 2005-02-07 at 10:39 -0800, Patrick Mansfield wrote:
> > > 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.
>
> > > 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).
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?
> 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_id\x14396&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] 14+ messages in thread
* Re: patches from the debian package
2005-02-05 15:50 patches from the debian package Marco d'Itri
` (10 preceding siblings ...)
2005-02-08 20:38 ` Kay Sievers
@ 2005-02-08 21:32 ` Patrick Mansfield
2005-02-08 21:59 ` Kay Sievers
12 siblings, 0 replies; 14+ messages in thread
From: Patrick Mansfield @ 2005-02-08 21:32 UTC (permalink / raw)
To: linux-hotplug
On Tue, Feb 08, 2005 at 09:38:46PM +0100, Kay Sievers wrote:
> On Tue, 2005-02-08 at 12:11 -0800, Patrick Mansfield wrote:
> > 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).
>
> 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.
> > 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_id\x14396&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] 14+ messages in thread
* Re: patches from the debian package
2005-02-05 15:50 patches from the debian package Marco d'Itri
` (11 preceding siblings ...)
2005-02-08 21:32 ` Patrick Mansfield
@ 2005-02-08 21:59 ` Kay Sievers
12 siblings, 0 replies; 14+ messages in thread
From: Kay Sievers @ 2005-02-08 21:59 UTC (permalink / raw)
To: linux-hotplug
On Tue, 2005-02-08 at 13:32 -0800, Patrick Mansfield wrote:
> On Tue, Feb 08, 2005 at 09:38:46PM +0100, Kay Sievers wrote:
> > On Tue, 2005-02-08 at 12:11 -0800, Patrick Mansfield wrote:
>
> > > 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).
> >
> > 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).
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_id\x14396&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] 14+ messages in thread
end of thread, other threads:[~2005-02-08 21:59 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-05 15:50 patches from the debian package Marco d'Itri
2005-02-05 16:14 ` Kay Sievers
2005-02-06 19:05 ` Patrick Mansfield
2005-02-06 19:16 ` Marco d'Itri
2005-02-06 23:13 ` Kay Sievers
2005-02-07 18:39 ` Patrick Mansfield
2005-02-08 19:50 ` Kay Sievers
2005-02-08 19:52 ` Kay Sievers
2005-02-08 20:11 ` Patrick Mansfield
2005-02-08 20:15 ` Greg KH
2005-02-08 20:26 ` Kay Sievers
2005-02-08 20:38 ` Kay Sievers
2005-02-08 21:32 ` Patrick Mansfield
2005-02-08 21:59 ` 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).