chiark / gitweb /
update SUSE rules
authorKay Sievers <kay.sievers@suse.de>
Sun, 4 Dec 2005 00:48:53 +0000 (01:48 +0100)
committerKay Sievers <kay.sievers@suse.de>
Sun, 4 Dec 2005 00:48:53 +0000 (01:48 +0100)
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Makefile
etc/udev/suse/50-udev.rules
etc/udev/suse/90-hal.rules
udevd.c

index 48a130491e172292d1c8feb69bc3db82739575e7..5995b576970f8469ae7e8bfc77aa8c08e7c6fee6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -106,7 +106,6 @@ GEN_CONFIGS = \
 GEN_HEADERS = \
        udev_version.h
 
 GEN_HEADERS = \
        udev_version.h
 
-# override this to make udev look in a different location for it's config files
 prefix =
 etcdir =       ${prefix}/etc
 sbindir =      ${prefix}/sbin
 prefix =
 etcdir =       ${prefix}/etc
 sbindir =      ${prefix}/sbin
index 768fdf0acb73c878b46ab1749009338ebdfab0cd..51561ffd0f75431e7638c849f6e70eb039498bca 100644 (file)
@@ -37,7 +37,7 @@ KERNEL=="vbi0",                       SYMLINK+="vbi"
 KERNEL=="pmu",                 GROUP="video"
 
 # dvb
 KERNEL=="pmu",                 GROUP="video"
 
 # dvb
-SUBSYSTEM="dvb", PROGRAM="/bin/sh -c 'X=%k; X=$${X#dvb}; A=$${X%%%%.*}; D=$${X#*.}; echo dvb/adapter$$A/$$D'", NAME="%c", GROUP="video"
+SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%i $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video"
 
 # Kino jogshuttle support
 SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="b33/10/*", RUN+="/usr/bin/killall --quiet -USR2 kino"
 
 # Kino jogshuttle support
 SUBSYSTEM=="usb", ACTION=="add", ENV{PRODUCT}=="b33/10/*", RUN+="/usr/bin/killall --quiet -USR2 kino"
@@ -51,8 +51,7 @@ KERNEL=="js*",                        NAME="input/%k", MODE="0644"
 KERNEL=="ts*",                 NAME="input/%k", MODE="0600"
 KERNEL=="uinput",              NAME="input/%k", MODE="0600"
 KERNEL=="lirc0",               NAME="%k", SYMLINK+="lirc"
 KERNEL=="ts*",                 NAME="input/%k", MODE="0600"
 KERNEL=="uinput",              NAME="input/%k", MODE="0600"
 KERNEL=="lirc0",               NAME="%k", SYMLINK+="lirc"
-KERNEL=="input[0-9]*",         RUN+="/lib/udev/input_device.sh"
-KERNEL=="input[0-9]*",         ACTION=="add", ENV{ABS}=="[1-9]*", RUN+="/sbin/modprobe joydev"
+KERNEL=="input[0-9]*", ACTION=="add", RUN+="/lib/udev/input.sh"
 
 # printer
 SUBSYSTEM=="usb",              KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
 
 # printer
 SUBSYSTEM=="usb",              KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
@@ -121,14 +120,13 @@ SUBSYSTEM=="block", GROUP="disk", MODE="0640"
 ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", RUN+="/bin/sh -c 'echo 60 > /sys/$DEVPATH/timeout'"
 ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", RUN+="/bin/sh -c 'echo 900 > /sys/$DEVPATH/timeout'"
 SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
 ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="0|7|14", RUN+="/bin/sh -c 'echo 60 > /sys/$DEVPATH/timeout'"
 ACTION=="add", SUBSYSTEM="scsi" , SYSFS{type}=="1", RUN+="/bin/sh -c 'echo 900 > /sys/$DEVPATH/timeout'"
 SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="0|7|14", RUN+="/sbin/modprobe sd_mod"
-# Treat osst as a unique case, that is, osst will load more often than
-SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1", SYSFS{device/vendor}=="OnStream", RUN+="/sbin/modprobe osst"
+SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1", SYSFS{device/vendor}=="On[sS]tream", RUN+="/sbin/modprobe osst"
 SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1", RUN+="/sbin/modprobe st"
 SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="[45]", RUN+="/sbin/modprobe sr_mod"
 SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg"
 
 SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="1", RUN+="/sbin/modprobe st"
 SUBSYSTEM=="scsi_device", ACTION=="add", SYSFS{device/type}=="[45]", RUN+="/sbin/modprobe sr_mod"
 SUBSYSTEM=="scsi_device", ACTION=="add", RUN+="/sbin/modprobe sg"
 
-# IDE/ATAPI handling
-SUBSYSTEM=="ide", ACTION=="add", RUN+="/lib/udev/load_ide_modules.sh"
+# IDE modules
+SUBSYSTEM=="ide", ACTION=="add", RUN+="/lib/udev/ide.sh"
 
 # device mapper
 KERNEL=="device-mapper", ACTION=="add", NAME="%k", SYMLINK+="mapper/control"
 
 # device mapper
 KERNEL=="device-mapper", ACTION=="add", NAME="%k", SYMLINK+="mapper/control"
@@ -161,7 +159,7 @@ KERNEL=="iseries/nvt*",             NAME="%k", GROUP="disk"
 KERNEL=="iseries/ibmsis*",     NAME="%k", GROUP="disk"
 
 # libusb device access
 KERNEL=="iseries/ibmsis*",     NAME="%k", GROUP="disk"
 
 # libusb device access
-SUBSYSTEM="usb_device", PROGRAM="/bin/sh -c 'X=%k X=$${X#usbdev}; B=$${X%%%%.*}; D=$${X#*.}; echo bus/usb/$$B/$$D'", SYMLINK+="%c"
+SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644"
 
 # firmware loader
 SUBSYSTEM=="firmware", ACTION=="add", RUN+="/lib/udev/firmware.sh"
 
 # firmware loader
 SUBSYSTEM=="firmware", ACTION=="add", RUN+="/lib/udev/firmware.sh"
index 9b2fe79ea5440c389814f3568f17ab9164694a32..b0b36330dfc75d48f19f70e09b628196ca408e20 100644 (file)
@@ -1,3 +1 @@
-# send all events to HAL
-
 RUN+="socket:/org/freedesktop/hal/udev_event"
 RUN+="socket:/org/freedesktop/hal/udev_event"
diff --git a/udevd.c b/udevd.c
index b87fe564134df50afb59509c19d77454ede56ca8..ff61c656c872c3d834efef79f6be1604136f9953 100644 (file)
--- a/udevd.c
+++ b/udevd.c
@@ -551,7 +551,7 @@ static struct uevent_msg *get_udevd_msg(void)
        size = recvmsg(udevd_sock, &smsg, 0);
        if (size <  0) {
                if (errno != EINTR)
        size = recvmsg(udevd_sock, &smsg, 0);
        if (size <  0) {
                if (errno != EINTR)
-                       err("unable to receive udevd message: %s", strerror(errno));
+                       err("unable to receive user udevd message: %s", strerror(errno));
                return NULL;
        }
        cmsg = CMSG_FIRSTHDR(&smsg);
                return NULL;
        }
        cmsg = CMSG_FIRSTHDR(&smsg);
@@ -626,7 +626,7 @@ static struct uevent_msg *get_netlink_msg(void)
        size = recv(uevent_netlink_sock, &buffer, sizeof(buffer), 0);
        if (size <  0) {
                if (errno != EINTR)
        size = recv(uevent_netlink_sock, &buffer, sizeof(buffer), 0);
        if (size <  0) {
                if (errno != EINTR)
-                       err("unable to receive udevd message: %s", strerror(errno));
+                       err("unable to receive kernel netlink message: %s", strerror(errno));
                return NULL;
        }
 
                return NULL;
        }