Hello community,
here is the log from the commit of package udev
checked in at Mon Mar 5 00:22:32 CET 2007.
--------
--- udev/udev.changes 2007-02-03 01:32:53.000000000 +0100
+++ /mounts/work_src_done/STABLE/udev/udev.changes 2007-03-03 20:05:00.358181000 +0100
@@ -1,0 +2,7 @@
+Sat Mar 3 18:43:56 CET 2007 - kay.sievers@suse.de
+
+- new upstream release 106
+ add persistent tape names
+- fix create_floppy_devices permissions (#244593)
+
+-------------------------------------------------------------------
Old:
----
udev-105.tar.bz2
New:
----
udev-106.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ udev.spec ++++++
--- /var/tmp/diff_new_pack.R26336/_old 2007-03-05 00:22:13.000000000 +0100
+++ /var/tmp/diff_new_pack.R26336/_new 2007-03-05 00:22:13.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package udev (Version 105)
+# spec file for package udev (Version 106)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -12,7 +12,7 @@
Name: udev
URL: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/
-Version: 105
+Version: 106
Release: 1
License: GNU General Public License (GPL)
Group: System/Kernel
@@ -259,7 +259,11 @@
%defattr(-,root,root)
/%{_lib}/libvolume_id.so.*
-%changelog -n udev
+%changelog
+* Sat Mar 03 2007 - kay.sievers@suse.de
+- new upstream release 106
+ add persistent tape names
+- fix create_floppy_devices permissions (#244593)
* Sat Feb 03 2007 - kay.sievers@suse.de
- new upstream release 105
fix volume_id's linux_raid detection
++++++ 50-udev-default.rules ++++++
--- udev/50-udev-default.rules 2007-01-10 16:08:51.000000000 +0100
+++ /mounts/work_src_done/STABLE/udev/50-udev-default.rules 2007-03-03 20:05:11.977550000 +0100
@@ -90,10 +90,9 @@
KERNEL=="pktcdvd", NAME="pktcdvd/control"
KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k"
-# fix floppy devices
+# additional floppy devices (no sysfs entries)
KERNEL=="nvram", ACTION=="add", RUN+="load_floppy_module.sh"
-KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M $root/%k"
-KERNEL=="fd[0-9]*", ACTION=="remove", RUN+="/bin/rm -f $root/%k*"
+KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G disk $root/%k"
# block devices
SUBSYSTEM=="block", GROUP="disk", MODE="0640"
++++++ udev-105.tar.bz2 -> udev-106.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/ChangeLog new/udev-106/ChangeLog
--- old/udev-105/ChangeLog 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/ChangeLog 2007-03-03 18:42:09.000000000 +0100
@@ -8,6 +8,54 @@
vol_id: add -L to print raw partition label
vol_id: document -L
+Jamie Wellnitz (1):
+ persistent device naming: tape devices and medium changers
+
+Kay Sievers (15):
+ exclude parent devices from DRIVER== match
+ volume_id: really fix endianess bug in linux_raid detection
+ release 105
+ man: correct udevinfo --export-db
+ path_id: append LUN to iSCSI path
+ create_floppy_devices: add option for owner/group
+ update example rules
+ apply format chars to ATTR before writing to sysfs
+ add (subsystem) to udevmonitor output
+ update DRIVER== changes
+ remove --version from the udevinfo man page
+ add test for an attribute which contains an operator char
+ man: add note about parent matching behavior
+ scsi_id: accept tabs in /etc/scsi_id.conf
+ remove dead rule in persistent tape rules
+
+Matthias Schwarzott (4):
+ correct typo in extras/scsi_id/scsi_id.conf
+ fix retry-loop in netif-rename code
+ add option --version to udevd
+ rule_generator: fix for creating rules on read-only filesystem
+
+Peter Breitenlohner (1):
+ fix INSTALL_PROGRAM vs. INSTALL_SCRIPT
+
+Sergey Vlasov (3):
+ udevd: init signal pipe before daemonizing
+ unlink old database file before creating a new one
+ fix %c $string substitution
+
+Theodoros V. Kalamatianos (1):
+ fix udev attribute names with a colon
+
+
+Summary of changes from v104 to v105
+============================================
+
+A. Costa (1):
+ man: fix typos in scsi_id and udevd
+
+Andrey Borzenkov (2):
+ vol_id: add -L to print raw partition label
+ vol_id: document -L
+
Kay Sievers (2):
exclude parent devices from DRIVER== match
volume_id: really fix endianess bug in linux_raid detection
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/etc/udev/redhat/50-udev.rules new/udev-106/etc/udev/redhat/50-udev.rules
--- old/udev-105/etc/udev/redhat/50-udev.rules 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/etc/udev/redhat/50-udev.rules 2007-03-03 18:42:09.000000000 +0100
@@ -68,6 +68,9 @@
KERNEL=="nvram", MODE="0660"
KERNEL=="rtc", MODE="0644"
+# pnp devices
+ACTION=="add", SUBSYSTEM=="pnp", RUN+="/bin/sh -c 'while read id; do /lib/udev/modprobe pnp:d$$id; done < /sys/$devpath/id'"
+
# floppy devices
KERNEL=="fd[01]*", GROUP="floppy", MODE="0660"
# fix floppy devices
@@ -75,6 +78,8 @@
KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M /dev/%k"
KERNEL=="fd[0-9]*", ACTION=="remove", RUN+="/bin/sh -c 'rm -f /dev/%k*'"
+BUS=="usb", KERNEL=="sd*", SYSFS{bInterfaceClass}=="08", SYSFS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k"
+
# audio devices
KERNEL=="dsp*", MODE="0660"
KERNEL=="audio*", MODE="0660"
@@ -100,6 +105,8 @@
KERNEL=="usb/lp*", GROUP="lp", MODE="0660"
# tape devices
+SUBSYSTEM=="ide", SYSFS{media}=="tape", ACTION=="add", \
+ RUN+="modprobe ide-scsi idescsi_nocd=1"
KERNEL=="ht*", GROUP="disk", MODE="0660"
KERNEL=="nht*", GROUP="disk", MODE="0660"
KERNEL=="pt[0-9]*", GROUP="disk", MODE="0660"
@@ -157,7 +164,7 @@
SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", \
NAME="%c", MODE="0660"
-KERNEL=="dm-[0-9]*", OPTIONS+="ignore_device"
+KERNEL=="dm-[0-9]*", ACTION=="add", OPTIONS+="ignore_device"
# alsa devices
KERNEL=="controlC[0-9]*", NAME="snd/%k"
@@ -173,6 +180,7 @@
KERNEL=="event*", NAME="input/%k"
KERNEL=="js*", NAME="input/%k", SYMLINK+="%k"
KERNEL=="ts*", NAME="input/%k"
+KERNEL=="uinput", NAME="input/%k"
# IEEE1394 (firewire) devices (must be before raw devices below)
KERNEL=="raw1394", NAME="%k"
@@ -212,15 +220,9 @@
KERNEL=="sr[0-9]*", SYMLINK+="cdrom cdrom-%k"
KERNEL=="scd[0-9]*", SYMLINK+="cdrom cdrom-%k"
KERNEL=="pcd[0-9]*", SYMLINK+="cdrom cdrom-%k"
-KERNEL=="fd[0-9]*", SYMLINK+="floppy-%k"
-KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660"
-KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape-%k", MODE="0660"
-
-KERNEL=="umad*", NAME="infiniband/%k", MODE="0660"
-KERNEL=="issm*", NAME="infiniband/%k", MODE="0660"
-KERNEL=="uverbs*", NAME="infiniband/%k", MODE="0660"
-KERNEL=="ucm*", NAME="infiniband/%k", MODE="0660"
-KERNEL=="rdma_cm", NAME="infiniband/%k", MODE="0660"
+KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k"
+KERNEL=="nst[0-9]", BUS=="scsi", SYMLINK+="tape tape-%k", MODE="0660"
+KERNEL=="nosst[0-9]", BUS=="scsi", SYMLINK+="tape tape-%k", MODE="0660"
# Section for zaptel device
KERNEL=="zapctl", NAME="zap/ctl"
@@ -231,9 +233,10 @@
KERNEL=="pktcdvd", NAME="%k/control"
-KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", \
- ATTRS{media}=="floppy", \
+KERNEL=="hd*[!0-9]", ATTR{removable}=="1", \
+ ATTR{media}=="floppy", \
SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions"
+KERNEL=="hd*[0-9]", ATTRS{media}=="floppy", ATTRS{removable}=="1", SYMLINK+="floppy-%k"
KERNEL=="hd[a-z]", BUS=="ide", ATTRS{removable}=="1", ATTRS{media}=="cdrom", SYMLINK+="cdrom cdrom-%k"
@@ -265,8 +268,8 @@
KERNEL=="ram*|loop*|fd*|nbd*|gnbd*", GOTO="persistent_end"
# never access removable ide devices, the drivers are causing event loops on open()
-BUS=="ide", DRIVERS!="ide-cdrom", ATTRS{removable}=="1", GOTO="persistent_end"
-BUS=="ide", KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end"
+KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", GOTO="persistent_end"
+KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end"
# by-id (hardware serial number)
KERNEL=="hd*[!0-9]", IMPORT{program}="/lib/udev/ata_id --export $tempnode"
@@ -312,7 +315,7 @@
PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", \
NAME="%c", MODE="0644"
-ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}"
+ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe $env{MODALIAS}"
ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'"
@@ -326,11 +329,11 @@
RUN+="/bin/sh -c 'echo 900 > /sys$$DEVPATH/timeout'"
-ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="/sbin/modprobe sg"
+ACTION=="add", SUBSYSTEM=="scsi_device" RUN+="modprobe sg"
ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \
- RUN+="/sbin/modprobe sd_mod"
+ RUN+="modprobe sd_mod"
ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \
- RUN+="/sbin/modprobe sr_mod"
+ RUN+="modprobe sr_mod"
ACTION=="add", KERNEL=="sg[0-9]*", BUS=="scsi", ATTRS{type}=="[36]", \
SYMLINK+="scanner scanner-%k", MODE="0660"
@@ -339,14 +342,14 @@
SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk"
ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \
- ATTRS{model}!="ADR*", RUN+="/sbin/modprobe osst"
+ ATTRS{model}!="ADR*", RUN+="modprobe osst"
ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \
- ATTRS{model}=="ADR*", RUN+="/sbin/modprobe st"
+ ATTRS{model}=="ADR*", RUN+="modprobe st"
ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="1", ATTRS{vendor}!="On[sS]tream", \
- RUN+="/sbin/modprobe st"
+ RUN+="modprobe st"
# mmc block devices
-ACTION=="add", SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block"
+ACTION=="add", SUBSYSTEM=="mmc", RUN+="modprobe mmc_block"
RUN+="socket:/org/kernel/udev/monitor"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/etc/udev/rules.d/60-persistent-storage.rules new/udev-106/etc/udev/rules.d/60-persistent-storage.rules
--- old/udev-105/etc/udev/rules.d/60-persistent-storage.rules 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/etc/udev/rules.d/60-persistent-storage.rules 2007-03-03 18:42:09.000000000 +0100
@@ -2,6 +2,16 @@
# scheme based on "Linux persistent device names", 2004, Hannes Reinecke
ACTION!="add", GOTO="persistent_storage_end"
+
+KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
+KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
+KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst"
+
+# type 8 devices are "Medium Changers"
+KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
+KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
+KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
+
SUBSYSTEM!="block", GOTO="persistent_storage_end"
# skip rules for inappropriate block devices
@@ -26,7 +36,9 @@
KERNEL=="dasd*[!0-9]", IMPORT{program}="dasd_id --export $tempnode"
KERNEL=="sd*[!0-9]|sr*|dasd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="sd*[0-9]|dasd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
-KERNEL=="st*", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
+
+KERNEL=="mmcblk[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}"
+KERNEL=="mmcblk[0-9]p[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n"
# by-path (shortest physical path)
KERNEL=="*[!0-9]|sr*", IMPORT{program}="path_id %p", SYMLINK+="disk/by-path/$env{ID_PATH}"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/etc/udev/suse/50-udev-default.rules new/udev-106/etc/udev/suse/50-udev-default.rules
--- old/udev-105/etc/udev/suse/50-udev-default.rules 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/etc/udev/suse/50-udev-default.rules 2007-03-03 18:42:09.000000000 +0100
@@ -92,7 +92,7 @@
# fix floppy devices
KERNEL=="nvram", ACTION=="add", RUN+="load_floppy_module.sh"
-KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M $root/%k"
+KERNEL=="fd[0-9]*", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G disk $root/%k"
KERNEL=="fd[0-9]*", ACTION=="remove", RUN+="/bin/rm -f $root/%k*"
# block devices
@@ -123,7 +123,7 @@
KERNEL=="pg*", GROUP="disk"
KERNEL=="evms/block_device*", GROUP="disk"
KERNEL=="rawctl*", NAME="raw/%k", GROUP="disk"
-SUBSYSTEM=="block", KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk"
+SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk"
KERNEL=="osst*|nosst*", NAME="%k", GROUP="disk"
KERNEL=="iseries/vt*", NAME="%k", GROUP="disk"
KERNEL=="iseries/nvt*", NAME="%k", GROUP="disk"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/extras/floppy/create_floppy_devices.c new/udev-106/extras/floppy/create_floppy_devices.c
--- old/udev-105/extras/floppy/create_floppy_devices.c 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/extras/floppy/create_floppy_devices.c 2007-03-03 18:42:09.000000000 +0100
@@ -21,6 +21,11 @@
#include
#include
#include
+#include
+#include
+
+#include "../../udev.h"
+#include "../../udev_selinux.h"
static char *table[] = {
"", "d360", "h1200", "u360", "u720", "h360", "h720",
@@ -34,8 +39,32 @@
static int t360[] = { 1, 0 };
static int t1200[] = { 2, 5, 6, 10, 12, 14, 16, 18, 20, 23, 0 };
static int t3in[] = { 8, 9, 26, 27, 28, 7, 11, 15, 19, 24, 25, 29, 31, 3, 4, 13, 17, 21, 22, 30, 0 };
+static int *table_sup[] = { NULL, t360, t1200, t3in+5+8, t3in+5, t3in, t3in };
+
+#ifdef USE_LOG
+void log_message(int priority, const char *format, ...)
+{
+ va_list args;
+ static int udev_log = -1;
+
+ if (udev_log == -1) {
+ const char *value;
+
+ value = getenv("UDEV_LOG");
+ if (value)
+ udev_log = log_priority(value);
+ else
+ udev_log = LOG_ERR;
+ }
-static int *table_sup[] = { NULL, t360, t1200, t3in + 5 + 8, t3in + 5, t3in, t3in };
+ if (priority > udev_log)
+ return;
+
+ va_start(args, format);
+ vsyslog(priority, format, args);
+ va_end(args);
+}
+#endif
int main(int argc, char **argv)
{
@@ -43,33 +72,42 @@
char node[64];
int type = 0, i, fdnum, c;
int major = 2, minor;
- int mode = 0;
+ uid_t uid = 0;
+ gid_t gid = 0;
+ mode_t mode = 0;
int create_nodes = 0;
int print_nodes = 0;
int unlink_nodes = 0;
int is_err = 0;
- while ((c = getopt(argc, argv, "cdm:M:t:u")) != -1) {
+ while ((c = getopt(argc, argv, "cudm:U:G:M:t:")) != -1) {
switch (c) {
case 'c':
create_nodes = 1;
unlink_nodes = 0;
break;
+ case 'u':
+ unlink_nodes = 1;
+ create_nodes = 0;
+ break;
case 'd':
print_nodes = 1;
break;
+ case 'U':
+ uid = lookup_user(optarg);
+ break;
+ case 'G':
+ gid = lookup_group(optarg);
+ break;
case 'M':
- mode = strtol(optarg, NULL, 10);
+ mode = strtol(optarg, NULL, 0);
+ mode = mode & 0666;
break;
case 'm':
- major = strtol(optarg, NULL, 10);
+ major = strtol(optarg, NULL, 0);
break;
case 't':
- type = strtol(optarg, NULL, 10);
- break;
- case 'u':
- unlink_nodes = 1;
- create_nodes = 0;
+ type = strtol(optarg, NULL, 0);
break;
default:
is_err++;
@@ -78,8 +116,15 @@
}
if (is_err || optind >= argc) {
- fprintf(stderr,"Usage: %s [-d|-c|-u|-m <major>|-t <type>] <device>\n",
- argv[0]);
+ printf("Usage: %s [OPTION] device\n"
+ " -c create\n"
+ " -d debug\n"
+ " -m Major number\n"
+ " -t floppy type number\n"
+ " -U device node user ownership\n"
+ " -G device node group owner\n"
+ " -M device node mode\n"
+ "\n", argv[0]);
return 1;
}
@@ -110,17 +155,24 @@
if (type == 0)
return 0;
+ selinux_init();
+
i = 0;
while (table_sup[type][i]) {
- sprintf(node, "%s%s",dev, table[table_sup[type][i]]);
+ sprintf(node, "%s%s", dev, table[table_sup[type][i]]);
minor = (table_sup[type][i] << 2) + fdnum;
if (print_nodes)
printf("%s b %d %d %d\n", node, mode, major, minor);
- if (create_nodes)
+ if (create_nodes) {
+ unlink(node);
+ selinux_setfscreatecon(node, NULL, mode);
mknod(node, S_IFBLK | mode, makedev(major,minor));
+ selinux_resetfscreatecon();
+ chown(node, uid, gid);
+ }
i++;
}
+ selinux_exit();
return 0;
}
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/extras/path_id/path_id new/udev-106/extras/path_id/path_id
--- old/udev-105/extras/path_id/path_id 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/extras/path_id/path_id 2007-03-03 18:42:09.000000000 +0100
@@ -332,6 +332,7 @@
local iscsi_session_dir
local iscsi_session iscsi_session_path
local iscsi_connection iscsi_connection_path
+ local iscsi_scsi_lun
# iSCSI device
iscsi_session_dir="${DEV%%/target*}"
iscsi_session="${iscsi_session_dir##*/}"
@@ -378,7 +379,8 @@
if [ -e "${iscsi_connection_path}/persistent_port" ] ; then
read iscsi_port < ${iscsi_connection_path}/persistent_port
fi
- d="ip-${iscsi_address}:${iscsi_port}-iscsi-${iscsi_tgtname}"
+ iscsi_scsi_lun="${DEV##*:}"
+ d="ip-${iscsi_address}:${iscsi_port}-iscsi-${iscsi_tgtname}-lun-${iscsi_scsi_lun}"
RESULT=0
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/extras/rule_generator/rule_generator.functions new/udev-106/extras/rule_generator/rule_generator.functions
--- old/udev-105/extras/rule_generator/rule_generator.functions 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/extras/rule_generator/rule_generator.functions 2007-03-03 18:42:09.000000000 +0100
@@ -92,7 +92,6 @@
local linkre="$2"
local match="$3"
- [ -e $RULES_FILE ] || return
local search='.*[[:space:],]'"$key"'"\('"$linkre"'\)"[[:space:]]*\(,.*\|\\\|\)$'
echo $(sed -n -e "${match}s/${search}/\1/p" $RO_RULES_FILE $RULES_FILE)
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/extras/scsi_id/scsi_id.8 new/udev-106/extras/scsi_id/scsi_id.8
--- old/udev-105/extras/scsi_id/scsi_id.8 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/extras/scsi_id/scsi_id.8 2007-03-03 18:42:09.000000000 +0100
@@ -154,7 +154,7 @@
.sp
.nf
-BUS=="scsi", PROGRAM=="/sbin/scsi_id -d %N -s %p", RESULT=="312345", NAME="disk%n"
+SUBSYSTEMS=="scsi", PROGRAM=="/sbin/scsi_id -d %N -s %p", RESULT=="312345", NAME="disk%n"
.fi
.P
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/extras/scsi_id/scsi_id.c new/udev-106/extras/scsi_id/scsi_id.c
--- old/udev-105/extras/scsi_id/scsi_id.c 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/extras/scsi_id/scsi_id.c 2007-03-03 18:42:09.000000000 +0100
@@ -377,11 +377,11 @@
/*
* argv[0] at 0 is skipped by getopt, but
* store the buffer address there for
- * alter freeing.
+ * later freeing
*/
(*newargv)[c] = buffer;
for (c = 1; c < *argc; c++)
- (*newargv)[c] = strsep(&buffer, " ");
+ (*newargv)[c] = strsep(&buffer, " \t");
}
} else {
/* No matches */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/extras/volume_id/vol_id.8 new/udev-106/extras/volume_id/vol_id.8
--- old/udev-105/extras/volume_id/vol_id.8 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/extras/volume_id/vol_id.8 2007-03-03 18:42:09.000000000 +0100
@@ -1,6 +1,6 @@
.\" Title: vol_id
.\" Author:
-.\" Generator: DocBook XSL Stylesheets v1.71.1 http://docbook.sf.net/
+.\" Generator: DocBook XSL Stylesheets v1.72.0 http://docbook.sf.net/
.\" Date: March 2006
.\" Manual: vol_id
.\" Source: volume_id
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/extras/volume_id/vol_id.c new/udev-106/extras/volume_id/vol_id.c
--- old/udev-105/extras/volume_id/vol_id.c 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/extras/volume_id/vol_id.c 2007-03-03 18:42:09.000000000 +0100
@@ -188,7 +188,8 @@
/* try to drop all privileges before reading disk content */
pw = getpwnam ("nobody");
if (pw != NULL && pw->pw_uid > 0 && pw->pw_gid > 0) {
- dbg("dropping privileges to %u:%u", (unsigned int)pw->pw_uid, (unsigned int)pw->pw_gid);
+ dbg("dropping privileges to %u:%u",
+ (unsigned int)pw->pw_uid, (unsigned int)pw->pw_gid);
if (setgroups(0, NULL) != 0 ||
setgid(pw->pw_gid) != 0 ||
setuid(pw->pw_uid) != 0) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/Makefile new/udev-106/Makefile
--- old/udev-105/Makefile 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/Makefile 2007-03-03 18:42:09.000000000 +0100
@@ -16,7 +16,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
-VERSION = 105
+VERSION = 106
# set this to make use of syslog
USE_LOG = true
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/test/sys/block/sda/test:colon+plus new/udev-106/test/sys/block/sda/test:colon+plus
--- old/udev-105/test/sys/block/sda/test:colon+plus 1970-01-01 01:00:00.000000000 +0100
+++ new/udev-106/test/sys/block/sda/test:colon+plus 2007-03-03 18:42:09.000000000 +0100
@@ -0,0 +1 @@
+colon
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/test/udev-test.pl new/udev-106/test/udev-test.pl
--- old/udev-105/test/udev-test.pl 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/test/udev-test.pl 2007-03-03 18:42:09.000000000 +0100
@@ -1556,11 +1556,20 @@
devpath => "/block/sda/sda1",
exp_name => "yes",
rules => < "operator chars in attribute",
+ subsys => "block",
+ devpath => "/block/sda",
+ exp_name => "yes",
+ rules => < "overlong comment line",
subsys => "block",
devpath => "/block/sda/sda1",
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/TODO new/udev-106/TODO
--- old/udev-105/TODO 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/TODO 2007-03-03 18:42:09.000000000 +0100
@@ -3,14 +3,12 @@
to syslog, so any error logged from the kernel can be associated with
any of the links at that time
-These things will change in future udev versions:
- o make DRIVER== to match only the event device
- (DRIVERS must be used, we currently translate it to DRIVERS and print
- a warning if DRIVER is used)
+These things will change in future udev versions:
o warn if BUS, ID, SYSFS are used as keys
(they are SUBSYSTEMS, KERNELS, ATTRS now)
+
These things are deprecated and scheduled for removal in a future
udev version:
o remove old udevdb dump 'udevinfo -d'
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/udev.7 new/udev-106/udev.7
--- old/udev-105/udev.7 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/udev.7 2007-03-03 18:42:09.000000000 +0100
@@ -1,6 +1,6 @@
.\" Title: udev
.\" Author:
-.\" Generator: DocBook XSL Stylesheets v1.71.1 http://docbook.sf.net/
+.\" Generator: DocBook XSL Stylesheets v1.72.0 http://docbook.sf.net/
.\" Date: August 2005
.\" Manual: udev
.\" Source: udev
@@ -57,7 +57,9 @@
.PP
The udev rules are read from the files located in the
\fI/etc/udev/rules.d\fR
-directory or at the location specified value in the configuration file. Every line in the rules file contains at least one key value pair. There are two kind of keys, match and assignment keys. If all match keys are matching against its value, the rule gets applied and the assign keys get the specified value assigned. A matching rule may specify the name of the device node, add a symlink pointing to the node, or run a specified program as part of the event handling. If no matching rule is found, the default device node name is used.
+directory or at the location specified value in the configuration file. Every line in the rules file contains at least one key value pair. There are two kind of keys, match and assignment keys. If all match keys are matching against its value, the rule gets applied and the assign keys get the specified value assigned.
+.PP
+A matching rule may specify the name of the device node, add a symlink pointing to the node, or run a specified program as part of the event handling. If no matching rule is found, the default device node name is used.
.PP
A rule may consists of a list of one or more key value pairs separated by a comma. Each key has a distinct operation, depending on the used operator. Valid operators are:
.PP
@@ -86,7 +88,7 @@
Assign a value to a key finally; disallow any later changes, which may be used to prevent changes by any later rules.
.RE
.PP
-The following key names can be used to match against device properties:
+The following key names can be used to match against device properties. Some of the keys also match against properties of the parent devices in sysfs, not only the device that has generated the event. If multiple keys that match a parent device are specified in a single rule, all these keys must match at one and the same parent device.
.PP
\fBACTION\fR
.RS 4
@@ -108,6 +110,11 @@
Match the subsystem of the event device.
.RE
.PP
+\fBDRIVER\fR
+.RS 4
+Match the driver name of the event device. Only set for devices which are bound to a driver at the time the event is generated.
+.RE
+.PP
\fBATTR{\fR\fB\fIfilename\fR\fR\fB}\fR
.RS 4
Match sysfs attribute values of the event device. Up to five
@@ -134,7 +141,7 @@
.RS 4
Search the devpath upwards for a device with matching sysfs attribute values. Up to five
\fBATTRS\fR
-keys can be specified per rule. All attributes must match on the same device. Trailing whitespace in the attribute values is ignored, if the specified match value does not contain trailing whitespace itself.
+keys can be specified per rule, but all of them must match on the same device. Trailing whitespace in the attribute values is ignored, if the specified match value does not contain trailing whitespace itself.
.RE
.PP
\fBENV{\fR\fB\fIkey\fR\fR\fB}\fR
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/udevd.8 new/udev-106/udevd.8
--- old/udev-105/udevd.8 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/udevd.8 2007-03-03 18:42:09.000000000 +0100
@@ -1,6 +1,6 @@
.\" Title: udevd
.\" Author:
-.\" Generator: DocBook XSL Stylesheets v1.71.1 http://docbook.sf.net/
+.\" Generator: DocBook XSL Stylesheets v1.72.0 http://docbook.sf.net/
.\" Date: August 2005
.\" Manual: udevd, udevcontrol
.\" Source: udev
@@ -14,7 +14,7 @@
udevd \- event managing daemon
.SH "SYNOPSIS"
.HP 6
-\fBudevd\fR [\fB\-\-daemon\fR] [\fB\-\-debug\-trace\fR] [\fB\-\-verbose\fR] [\fB\-\-help\fR]
+\fBudevd\fR [\fB\-\-daemon\fR] [\fB\-\-debug\-trace\fR] [\fB\-\-verbose\fR] [\fB\-\-version\fR] [\fB\-\-help\fR]
.HP 20
\fBudevcontrol \fR\fB\fIcommand\fR\fR
.SH "DESCRIPTION"
@@ -37,6 +37,11 @@
Print log messages to stdout.
.RE
.PP
+\fB\-\-version\fR
+.RS 4
+Print version number.
+.RE
+.PP
\fB\-\-help\fR
.RS 4
Print usage.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/udevd.c new/udev-106/udevd.c
--- old/udev-105/udevd.c 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/udevd.c 2007-03-03 18:42:09.000000000 +0100
@@ -943,6 +943,7 @@
{ "debug-trace", 0, NULL, 't' },
{ "verbose", 0, NULL, 'v' },
{ "help", 0, NULL, 'h' },
+ { "version", 0, NULL, 'V' },
{}
};
int rc = 1;
@@ -955,7 +956,7 @@
/* parse commandline options */
while (1) {
- option = getopt_long(argc, argv, "dtvh", options, NULL);
+ option = getopt_long(argc, argv, "dtvhV", options, NULL);
if (option == -1)
break;
@@ -972,7 +973,10 @@
udev_log_priority = LOG_INFO;
break;
case 'h':
- printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--verbose]\n");
+ printf("Usage: udevd [--help] [--daemon] [--debug-trace] [--verbose] [--version]\n");
+ goto exit;
+ case 'V':
+ printf("%s\n", UDEV_VERSION);
goto exit;
default:
goto exit;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/udevd.xml new/udev-106/udevd.xml
--- old/udev-105/udevd.xml 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/udevd.xml 2007-03-03 18:42:09.000000000 +0100
@@ -28,6 +28,7 @@
<arg><option>--daemon</option></arg>
<arg><option>--debug-trace</option></arg>
<arg><option>--verbose</option></arg>
+ <arg><option>--version</option></arg>
<arg><option>--help</option></arg>
</cmdsynopsis>
<cmdsynopsis>
@@ -65,6 +66,12 @@
</listitem>
</varlistentry>
<varlistentry>
+ <term><option>--version</option></term>
+ <listitem>
+ <para>Print version number.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term><option>--help</option></term>
<listitem>
<para>Print usage.</para>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/udevinfo.8 new/udev-106/udevinfo.8
--- old/udev-105/udevinfo.8 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/udevinfo.8 2007-03-03 18:42:09.000000000 +0100
@@ -1,6 +1,6 @@
.\" Title: udevinfo
.\" Author:
-.\" Generator: DocBook XSL Stylesheets v1.71.1 http://docbook.sf.net/
+.\" Generator: DocBook XSL Stylesheets v1.72.0 http://docbook.sf.net/
.\" Date: August 2005
.\" Manual: udevinfo
.\" Source: udev
@@ -11,10 +11,10 @@
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
-udevinfo \- query device information from the udev database
+udevinfo \- query udev device information
.SH "SYNOPSIS"
.HP 9
-\fBudevinfo\fR [\fB\-\-query=\fR\fB\fIquery\-type\fR\fR] [\fB\-\-path=\fR\fB\fIdevpath\fR\fR] [\fB\-\-name=\fR\fB\fInode\fR\fR] [\fB\-\-root\fR] [\fB\-\-attribute\-walk\fR] [\fB\-\-export\-db\fR] [\fB\-\-version\fR] [\fB\-\-help\fR]
+\fBudevinfo\fR [\fB\-\-query=\fR\fB\fIquery\-type\fR\fR] [\fB\-\-path=\fR\fB\fIdevpath\fR\fR] [\fB\-\-name=\fR\fB\fInode\fR\fR] [\fB\-\-root\fR] [\fB\-\-attribute\-walk\fR] [\fB\-\-export\-db\fR] [\fB\-\-help\fR]
.SH "DESCRIPTION"
.PP
udevinfo queries the udev database for device information stored in the udev database. It can also query the properties of a device from its sysfs representation to help creating udev rules that match this device.
@@ -59,7 +59,7 @@
Print all sysfs properties of the specified device that can be used in udev rules to match the specified device. It prints all devices along the chain, up to the root of sysfs that can be used in udev rules.
.RE
.PP
-\fB\-\-export\fR
+\fB\-\-export\-db\fR
.RS 4
Export the content of the udev database.
.RE
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/udevinfo.c new/udev-106/udevinfo.c
--- old/udev-105/udevinfo.c 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/udevinfo.c 2007-03-03 18:42:09.000000000 +0100
@@ -308,7 +308,6 @@
" --root prepend to query result or print udev_root\n"
" --attribute-walk print all SYSFS_attributes along the device chain\n"
" --export-db export the content of the udev database\n"
- " --version print udev version\n"
" --help print this text\n"
"\n");
goto exit;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/udevinfo.xml new/udev-106/udevinfo.xml
--- old/udev-105/udevinfo.xml 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/udevinfo.xml 2007-03-03 18:42:09.000000000 +0100
@@ -19,7 +19,8 @@
</refmeta>
<refnamediv>
- <refname>udevinfo</refname><refpurpose>query device information from the udev database</refpurpose>
+ <refname>udevinfo</refname>
+ <refpurpose>query udev device information</refpurpose>
</refnamediv>
<refsynopsisdiv>
@@ -31,7 +32,6 @@
<arg><option>--root</option></arg>
<arg><option>--attribute-walk</option></arg>
<arg><option>--export-db</option></arg>
- <arg><option>--version</option></arg>
<arg><option>--help</option></arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -84,7 +84,7 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><option>--export</option></term>
+ <term><option>--export-db</option></term>
<listitem>
<para>Export the content of the udev database.</para>
</listitem>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/udevmonitor.8 new/udev-106/udevmonitor.8
--- old/udev-105/udevmonitor.8 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/udevmonitor.8 2007-03-03 18:42:09.000000000 +0100
@@ -1,6 +1,6 @@
.\" Title: udevmonitor
.\" Author:
-.\" Generator: DocBook XSL Stylesheets v1.71.1 http://docbook.sf.net/
+.\" Generator: DocBook XSL Stylesheets v1.72.0 http://docbook.sf.net/
.\" Date: August 2005
.\" Manual: udevmonitor
.\" Source: udev
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/udevmonitor.c new/udev-106/udevmonitor.c
--- old/udev-105/udevmonitor.c 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/udevmonitor.c 2007-03-03 18:42:09.000000000 +0100
@@ -106,6 +106,26 @@
udev_exit = 1;
}
+static const char *search_key(const char *searchkey, const char *buf, size_t buflen)
+{
+ size_t bufpos = 0;
+ size_t searchkeylen = strlen(searchkey);
+
+ while (bufpos < buflen) {
+ const char *key;
+ int keylen;
+
+ key = &buf[bufpos];
+ keylen = strlen(key);
+ if (keylen == 0)
+ break;
+ if ((strncmp(searchkey, key, searchkeylen) == 0) && key[searchkeylen] == '=')
+ return &key[searchkeylen + 1];
+ bufpos += keylen + 1;
+ }
+ return NULL;
+}
+
int main(int argc, char *argv[])
{
struct sigaction act;
@@ -156,10 +176,14 @@
while (!udev_exit) {
char buf[UEVENT_BUFFER_SIZE*2];
ssize_t buflen;
+ ssize_t bufpos;
+ ssize_t keys;
int fdcount;
struct timeval tv;
struct timezone tz;
char timestr[64];
+ const char *source = NULL;
+ const char *devpath, *action, *subsys;
buflen = 0;
FD_ZERO(&readfds);
@@ -183,33 +207,35 @@
if ((uevent_netlink_sock >= 0) && FD_ISSET(uevent_netlink_sock, &readfds)) {
buflen = recv(uevent_netlink_sock, &buf, sizeof(buf), 0);
- if (buflen <= 0) {
+ if (buflen <= 0) {
fprintf(stderr, "error receiving uevent message: %s\n", strerror(errno));
continue;
}
- printf("UEVENT[%s] %s\n", timestr, buf);
+ source = "UEVENT";
}
if ((udev_monitor_sock >= 0) && FD_ISSET(udev_monitor_sock, &readfds)) {
buflen = recv(udev_monitor_sock, &buf, sizeof(buf), 0);
- if (buflen <= 0) {
+ if (buflen <= 0) {
fprintf(stderr, "error receiving udev message: %s\n", strerror(errno));
continue;
}
- printf("UDEV [%s] %s\n", timestr, buf);
+ source = "UDEV ";
}
if (buflen == 0)
continue;
+ keys = strlen(buf) + 1; /* start of payload */
+ devpath = search_key("DEVPATH", &buf[keys], buflen);
+ action = search_key("ACTION", &buf[keys], buflen);
+ subsys = search_key("SUBSYSTEM", &buf[keys], buflen);
+ printf("%s[%s] %-8s %s (%s)\n", source, timestr, action, devpath, subsys);
+
/* print environment */
+ bufpos = keys;
if (env) {
- size_t bufpos;
-
- /* start of payload */
- bufpos = strlen(buf) + 1;
-
- while (bufpos < (size_t)buflen) {
+ while (bufpos < buflen) {
int keylen;
char *key;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/udev_rules.c new/udev-106/udev_rules.c
--- old/udev-105/udev_rules.c 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/udev_rules.c 2007-03-03 18:42:09.000000000 +0100
@@ -842,18 +842,20 @@
if (pair->key.operation == KEY_OP_ASSIGN) {
const char *key_name = key_pair_name(rule, pair);
- const char *key_value = key_val(rule, &pair->key);
char attr[PATH_SIZE];
+ char value[NAME_SIZE];
FILE *f;
strlcpy(attr, sysfs_path, sizeof(attr));
strlcat(attr, udev->dev->devpath, sizeof(attr));
strlcat(attr, "/", sizeof(attr));
strlcat(attr, key_name, sizeof(attr));
- dbg("write '%s' to '%s'", key_value, attr);
+ strlcpy(value, key_val(rule, &pair->key), sizeof(value));
+ udev_rules_apply_format(udev, value, sizeof(value));
+ info("writing '%s' to sysfs file '%s'", value, attr);
f = fopen(attr, "w");
if (f != NULL) {
- if (fprintf(f, "%s\n", key_value) <= 0)
+ if (fprintf(f, "%s", value) <= 0)
err("error writing ATTR{%s}: %s", attr, strerror(errno));
fclose(f);
} else
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/udev_rules_parse.c new/udev-106/udev_rules_parse.c
--- old/udev-105/udev_rules_parse.c 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/udev_rules_parse.c 2007-03-03 18:42:09.000000000 +0100
@@ -104,12 +104,9 @@
break;
if (linepos[0] == '=')
break;
- if (linepos[0] == '+')
- break;
- if (linepos[0] == '!')
- break;
- if (linepos[0] == ':')
- break;
+ if ((linepos[0] == '+') || (linepos[0] == '!') || (linepos[0] == ':'))
+ if (linepos[1] == '=')
+ break;
}
/* remember end of key */
@@ -307,6 +304,11 @@
}
if (strcasecmp(key, "DRIVER") == 0) {
+ if (operation != KEY_OP_MATCH &&
+ operation != KEY_OP_NOMATCH) {
+ err("invalid DRIVER operation");
+ goto invalid;
+ }
add_rule_key(rule, &rule->driver, operation, value);
valid = 1;
continue;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/udev_selinux.c new/udev-106/udev_selinux.c
--- old/udev-105/udev_selinux.c 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/udev_selinux.c 2007-03-03 18:42:09.000000000 +0100
@@ -90,8 +90,7 @@
char *media;
int ret = -1;
- if(devname)
- {
+ if (devname) {
media = get_media(devname, mode);
if (media) {
ret = matchmediacon(media, &scontext);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/udevsettle.8 new/udev-106/udevsettle.8
--- old/udev-105/udevsettle.8 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/udevsettle.8 2007-03-03 18:42:09.000000000 +0100
@@ -1,6 +1,6 @@
.\" Title: udevsettle
.\" Author:
-.\" Generator: DocBook XSL Stylesheets v1.71.1 http://docbook.sf.net/
+.\" Generator: DocBook XSL Stylesheets v1.72.0 http://docbook.sf.net/
.\" Date: March 2006
.\" Manual: udevsettle
.\" Source: udev
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/udevstart.8 new/udev-106/udevstart.8
--- old/udev-105/udevstart.8 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/udevstart.8 2007-03-03 18:42:09.000000000 +0100
@@ -1,6 +1,6 @@
.\" Title: udevstart
.\" Author:
-.\" Generator: DocBook XSL Stylesheets v1.71.1 http://docbook.sf.net/
+.\" Generator: DocBook XSL Stylesheets v1.72.0 http://docbook.sf.net/
.\" Date: August 2005
.\" Manual: udevstart
.\" Source: udev
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/udevtest.8 new/udev-106/udevtest.8
--- old/udev-105/udevtest.8 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/udevtest.8 2007-03-03 18:42:09.000000000 +0100
@@ -1,6 +1,6 @@
.\" Title: udevtest
.\" Author:
-.\" Generator: DocBook XSL Stylesheets v1.71.1 http://docbook.sf.net/
+.\" Generator: DocBook XSL Stylesheets v1.72.0 http://docbook.sf.net/
.\" Date: August 2005
.\" Manual: udevtest
.\" Source: udev
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/udevtrigger.8 new/udev-106/udevtrigger.8
--- old/udev-105/udevtrigger.8 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/udevtrigger.8 2007-03-03 18:42:09.000000000 +0100
@@ -1,6 +1,6 @@
.\" Title: udevtrigger
.\" Author:
-.\" Generator: DocBook XSL Stylesheets v1.71.1 http://docbook.sf.net/
+.\" Generator: DocBook XSL Stylesheets v1.72.0 http://docbook.sf.net/
.\" Date: March 2006
.\" Manual: udevtrigger
.\" Source: udev
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-105/udev.xml new/udev-106/udev.xml
--- old/udev-105/udev.xml 2007-02-03 01:24:48.000000000 +0100
+++ new/udev-106/udev.xml 2007-03-03 18:42:09.000000000 +0100
@@ -84,10 +84,11 @@
value in the configuration file. Every line in the rules file contains at least
one key value pair. There are two kind of keys, match and assignment keys.
If all match keys are matching against its value, the rule gets applied and the
- assign keys get the specified value assigned. A matching rule may specify the
- name of the device node, add a symlink pointing to the node, or run a specified
- program as part of the event handling. If no matching rule is found, the default
- device node name is used.</para>
+ assign keys get the specified value assigned.</para>
+
+ <para>A matching rule may specify the name of the device node, add a symlink
+ pointing to the node, or run a specified program as part of the event handling.
+ If no matching rule is found, the default device node name is used.</para>
<para>A rule may consists of a list of one or more key value pairs separated by
a comma. Each key has a distinct operation, depending on the used operator. Valid
@@ -131,7 +132,11 @@
</varlistentry>
</variablelist>
- <para>The following key names can be used to match against device properties:</para>
+ <para>The following key names can be used to match against device properties.
+ Some of the keys also match against properties of the parent devices in sysfs,
+ not only the device that has generated the event. If multiple keys that match
+ a parent device are specified in a single rule, all these keys must match at
+ one and the same parent device.</para>
<variablelist>
<varlistentry>
<term><option>ACTION</option></term>
@@ -160,14 +165,13 @@
<para>Match the subsystem of the event device.</para>
</listitem>
</varlistentry>
-
<varlistentry>
<term><option>ATTR{<replaceable>filename</replaceable>}</option></term>
<listitem>
@@ -205,7 +209,7 @@
<term><option>ATTRS{<replaceable>filename</replaceable>}</option></term>
<listitem>
<para>Search the devpath upwards for a device with matching sysfs attribute values.
- Up to five <option>ATTRS</option> keys can be specified per rule. All attributes
+ Up to five <option>ATTRS</option> keys can be specified per rule, but all of them
must match on the same device. Trailing whitespace in the attribute values is ignored,
if the specified match value does not contain trailing whitespace itself.</para>
</listitem>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org