Hello community,
here is the log from the commit of package udev
checked in at Sun May 6 17:18:47 CEST 2007.
--------
--- udev/udev.changes 2007-04-24 01:33:46.000000000 +0200
+++ /mounts/work_src_done/STABLE/udev/udev.changes 2007-05-06 16:10:54.057837000 +0200
@@ -1,0 +2,13 @@
+Tue May 1 14:44:23 CEST 2007 - kay.sievers@suse.de
+
+- new upstream release 110
+- remove eventrecorder.sh
+- volume_id: add support for md metadata-format 1.0, 1.1, 1.2
+- add fuse rule
+- add /dev/bus/usb/-nodes rule for new libusb-nodes
+- most suse rules in the udev package moved to the default rules
+ install all default rules and the remaining custom suse rules
+- enable the udev persistent rules generator for network devices
+ this replaces the one provided from sysconfig
+
+-------------------------------------------------------------------
@@ -3,0 +17 @@
+- new upstream release 109
Old:
----
udev-109.tar.bz2
New:
----
udev-110.tar.bz2
udev-git.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ udev.spec ++++++
--- /var/tmp/diff_new_pack.U25963/_old 2007-05-06 17:18:34.000000000 +0200
+++ /var/tmp/diff_new_pack.U25963/_new 2007-05-06 17:18:34.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package udev (Version 109)
+# spec file for package udev (Version 110)
#
# 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: 109
+Version: 110
Release: 1
License: GNU General Public License (GPL)
Group: System/Kernel
@@ -31,6 +31,7 @@
# doc
Source70: show_event_log
Source71: README.debug
+Patch0: udev-git.patch
%description
udev's main task is to create and remove device nodes in /dev when a
@@ -79,16 +80,13 @@
%define extras "extras/scsi_id extras/volume_id extras/ata_id extras/usb_id extras/edd_id extras/cdrom_id extras/floppy extras/path_id extras/firmware extras/rule_generator"
%prep
%setup
+%patch0 -p1
%build
make V=1 libdir=/%{_lib} usrlibdir=%{_libdir} OPTFLAGS="${RPM_OPT_FLAGS}" EXTRAS=%{extras} all
%install
make V=1 DESTDIR=$RPM_BUILD_ROOT libdir=/%{_lib} usrlibdir=%{_libdir} EXTRAS=%{extras} install
-# disable persistent rules until sysconfig is ready
-mv ${RPM_BUILD_ROOT}/etc/udev/rules.d/75-persistent-net-generator.rules \
- ${RPM_BUILD_ROOT}/etc/udev/rules.d/75-persistent-net-generator.rules.disabled
-install -m755 -D extras/eventrecorder.sh ${RPM_BUILD_ROOT}/lib/udev/eventrecorder.sh
install -m644 -D extras/scsi_id/README ../doc/scsi_id/README
install -m644 -D extras/volume_id/README ../doc/vol_id/README
install -m644 -D FAQ ../doc/FAQ
@@ -98,6 +96,7 @@
install -m644 -D ChangeLog ../doc/ChangeLog
#
# install SUSE stuff
+cp etc/udev/rules.d/*.rules $RPM_BUILD_ROOT/etc/udev/rules.d/
cp etc/udev/suse/*.rules $RPM_BUILD_ROOT/etc/udev/rules.d/
install -m755 -D %{S:60} $RPM_BUILD_ROOT/etc/init.d/boot.udev
install -m755 -D %{S:61} $RPM_BUILD_ROOT/etc/init.d/boot.udev_retry
@@ -174,7 +173,6 @@
# helper
%dir /lib/udev
/lib/udev/create_floppy_devices
-/lib/udev/eventrecorder.sh
/lib/udev/firmware.sh
/lib/udev/write_cd_rules
/lib/udev/write_net_rules
@@ -242,7 +240,18 @@
/%{_lib}/libvolume_id.so.*
%changelog
+* Tue May 01 2007 - kay.sievers@suse.de
+- new upstream release 110
+- remove eventrecorder.sh
+- volume_id: add support for md metadata-format 1.0, 1.1, 1.2
+- add fuse rule
+- add /dev/bus/usb/-nodes rule for new libusb-nodes
+- most suse rules in the udev package moved to the default rules
+ install all default rules and the remaining custom suse rules
+- enable the udev persistent rules generator for network devices
+ this replaces the one provided from sysconfig
* Tue Apr 24 2007 - kay.sievers@suse.de
+- new upstream release 109
- add Short-Description: to init scripts
- install the rules from the suse directory in the udev package
- disable /etc/udev/rules.d/65-cdrom.rules which is created by
++++++ udev-109.tar.bz2 -> udev-110.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/ChangeLog new/udev-110/ChangeLog
--- old/udev-109/ChangeLog 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/ChangeLog 2007-05-01 14:33:39.000000000 +0200
@@ -1,3 +1,30 @@
+Summary of changes from v109 to v110
+============================================
+
+Harald Hoyer (1):
+ udevcontrol: allow to set global variables in udevd
+
+Kay Sievers (13):
+ remove eventrecorder.sh
+ update SUSE rules
+ volume_id: add md metadata 1.0, 1.1, 1.2 support
+ unset variable with ENV{VAR}=""
+ delete copies of default rules in SUSE rules
+ volume_id: ext - fix endianess in version number
+ rules: Fedora update
+ volume_id: old md metadata has only 32 bit for the uuid
+ volume_id: minix version 3 support
+ don't create $tempnode for devices without major
+ usb_id: add <devpath> to help text
+ ata_id: use getopt_long()
+ rules: SUSE update
+
+Matthias Schwarzott (3):
+ Makefile: respect CFLAGS/LDFLAGS
+ rules: Gentoo update
+ ata_id: don't log error for libata devices on older kernels
+
+
Summary of changes from v108 to v109
============================================
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/etc/udev/gentoo/50-udev.rules new/udev-110/etc/udev/gentoo/50-udev.rules
--- old/udev-109/etc/udev/gentoo/50-udev.rules 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/etc/udev/gentoo/50-udev.rules 2007-05-01 14:33:39.000000000 +0200
@@ -170,7 +170,7 @@
KERNEL=="auer*", NAME="usb/%k"
KERNEL=="legousbtower*", NAME="usb/%k", GROUP="usb"
KERNEL=="dabusb*", NAME="usb/%k"
-BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k", GROUP="lp"
+KERNEL=="lp[0-9]*", SUBSYSTEM=="usb", NAME="usb/%k", GROUP="lp"
# v4l devices
KERNEL=="video[0-9]*", NAME="v4l/video%n", SYMLINK+="video%n", GROUP="video"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/etc/udev/gentoo/64-device-mapper.rules new/udev-110/etc/udev/gentoo/64-device-mapper.rules
--- old/udev-109/etc/udev/gentoo/64-device-mapper.rules 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/etc/udev/gentoo/64-device-mapper.rules 2007-05-01 14:33:39.000000000 +0200
@@ -3,9 +3,8 @@
KERNEL=="device-mapper", NAME="mapper/control"
-KERNEL=="dm-*", ACTION=="add|change", GOTO="device_mapper_do"
-GOTO="device_mapper_end"
-LABEL="device_mapper_do"
+KERNEL!="dm-*", GOTO="device_mapper_end"
+ACTION!="add|change", GOTO="device_mapper_end"
# lookup device name
# use dmsetup, until devmap_name is provided by sys-fs/device-mapper
@@ -25,7 +24,8 @@
RESULT=="|*snapshot*|*error*", GOTO="device_mapper_end"
IMPORT{program}="vol_id --export $tempnode"
-ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}", OPTIONS="link_priority=50"
-ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}", OPTIONS="link_priority=50"
+OPTIONS="link_priority=50"
+ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
+ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
LABEL="device_mapper_end"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/etc/udev/gentoo/95-udev-late.rules new/udev-110/etc/udev/gentoo/95-udev-late.rules
--- old/udev-109/etc/udev/gentoo/95-udev-late.rules 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/etc/udev/gentoo/95-udev-late.rules 2007-05-01 14:33:39.000000000 +0200
@@ -13,9 +13,6 @@
SUBSYSTEM=="net", ACTION=="add", RUN+="net.sh %k start"
SUBSYSTEM=="net", ACTION=="remove", RUN+="net.sh %k stop"
-# debug events to /events, but not on default udev_log="err"
-ENV{UDEV_LOG}=="[4-9]", RUN+="eventrecorder.sh"
-
# event to be catched by udevmonitor
RUN+="socket:/org/kernel/udev/monitor"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/etc/udev/redhat/05-udev-early.rules new/udev-110/etc/udev/redhat/05-udev-early.rules
--- old/udev-109/etc/udev/redhat/05-udev-early.rules 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/etc/udev/redhat/05-udev-early.rules 2007-05-01 14:33:39.000000000 +0200
@@ -1,10 +1,17 @@
# sysfs is populated after the event is sent
ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
-ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
-ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
-
# ignore these events until someone needs them
SUBSYSTEM=="drivers", OPTIONS="ignore_device"
SUBSYSTEM=="module", OPTIONS="ignore_device"
+
+ACTION=="add", SUBSYSTEM=="?*", ENV{MODALIAS}=="?*", RUN+="modprobe $env{MODALIAS}", OPTIONS="last_rule"
+
+# pnp devices
+ACTION=="add", SUBSYSTEM=="pnp", RUN+="/bin/sh -c 'while read id; do /lib/udev/modprobe pnp:d$$id; done < /sys/$devpath/id'", OPTIONS="last_rule"
+
+ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
+
+ACTION=="add", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
+
ACTION=="add", SUBSYSTEM=="firmware", ENV{FIRMWARE}=="*", RUN="/sbin/firmware_helper", OPTIONS="last_rule"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/etc/udev/redhat/50-udev.rules new/udev-110/etc/udev/redhat/50-udev.rules
--- old/udev-109/etc/udev/redhat/50-udev.rules 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/etc/udev/redhat/50-udev.rules 2007-05-01 14:33:39.000000000 +0200
@@ -65,9 +65,6 @@
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
@@ -230,6 +227,7 @@
KERNEL=="pktcdvd", NAME="%k/control"
+
KERNEL=="hd*[!0-9]", ATTR{removable}=="1", \
ATTR{media}=="floppy", \
SYMLINK+="floppy floppy-%k", OPTIONS+="ignore_remove, all_partitions"
@@ -252,6 +250,7 @@
OPTIONS+="ignore_remove"
+
#######################################
# Persistent block device stuff - begin
#######################################
@@ -311,9 +310,6 @@
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+="modprobe $env{MODALIAS}"
-
-ACTION=="add", SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", RUN+="/bin/sh -c 'echo 1 > /sys/$DEVPATH/allow_func_id_match'"
# sd: 0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
# sr: 4 TYPE_WORM, 5 TYPE_ROM
@@ -347,5 +343,6 @@
# mmc block devices
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-109/etc/udev/redhat/95-pam-console.rules new/udev-110/etc/udev/redhat/95-pam-console.rules
--- old/udev-109/etc/udev/redhat/95-pam-console.rules 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/etc/udev/redhat/95-pam-console.rules 2007-05-01 14:33:39.000000000 +0200
@@ -1 +1 @@
-ACTION=="add", SYSFS{dev}=="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}"
+ENV{STARTUP}!="1", ACTION=="add", SYSFS{dev}=="?*", KERNEL=="?*", RUN+="/sbin/pam_console_apply $env{DEVNAME} $env{DEVLINKS}"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/etc/udev/suse/05-udev-early.rules new/udev-110/etc/udev/suse/05-udev-early.rules
--- old/udev-109/etc/udev/suse/05-udev-early.rules 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/etc/udev/suse/05-udev-early.rules 1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-# sysfs is populated after the event is sent
-ACTION=="add", KERNEL=="[0-9]*:[0-9]*", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/etc/udev/suse/60-persistent-input.rules new/udev-110/etc/udev/suse/60-persistent-input.rules
--- old/udev-109/etc/udev/suse/60-persistent-input.rules 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/etc/udev/suse/60-persistent-input.rules 1970-01-01 01:00:00.000000000 +0100
@@ -1,30 +0,0 @@
-ACTION!="add", GOTO="persistent_input_end"
-SUBSYSTEM!="input", GOTO="persistent_input_end"
-KERNEL=="input[0-9]*", GOTO="persistent_input_end"
-
-# usb devices
-SUBSYSTEMS=="usb", IMPORT{program}="usb_id -x"
-SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="01", ENV{ID_CLASS}="kbd"
-SUBSYSTEMS=="usb", ATTRS{bInterfaceClass}=="03", ATTRS{bInterfaceProtocol}=="02", ENV{ID_CLASS}="mouse"
-
-# other devices
-DRIVERS=="pcspkr", ENV{ID_CLASS}="spkr"
-DRIVERS=="atkbd", ENV{ID_CLASS}="kbd"
-DRIVERS=="psmouse", ENV{ID_CLASS}="mouse"
-ATTRS{name}=="*dvb*|*DVB*|* IR *", ENV{ID_CLASS}="ir"
-ATTRS{modalias}=="input:*-*a[068],*|input:*-*a*,[68],*m*", ATTRS{modalias}!="input:*-*k*14A,*r*", ENV{ID_CLASS}="joystick"
-
-# fill empty serial number
-ENV{ID_CLASS}=="?*", ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial"
-
-# by-id links
-KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_CLASS}"
-KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{ID_CLASS}=="?*", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{ID_CLASS}"
-
-# by-path
-IMPORT{program}="path_id %p"
-ENV{ID_PATH}=="?*", KERNEL=="mouse*|js*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{ID_CLASS}"
-ENV{ID_PATH}=="?*", KERNEL=="event*", SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{ID_CLASS}"
-
-LABEL="persistent_input_end"
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/etc/udev/suse/60-persistent-storage.rules new/udev-110/etc/udev/suse/60-persistent-storage.rules
--- old/udev-109/etc/udev/suse/60-persistent-storage.rules 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/etc/udev/suse/60-persistent-storage.rules 1970-01-01 01:00:00.000000000 +0100
@@ -1,64 +0,0 @@
-# persistent storage links: /dev/{disk,tape}/{by-id,by-uuid,by-label,by-path,by-name}
-# 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
-KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|dm-*|md*", GOTO="persistent_storage_end"
-
-# never access non-cdrom removable ide devices, the drivers are causing event loops on open()
-KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", GOTO="persistent_storage_end"
-KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_storage_end"
-
-# for partitions import parent information
-KERNEL=="*[0-9]", IMPORT{parent}="ID_*"
-
-# by-id (hardware serial number)
-KERNEL=="hd*[!0-9]", IMPORT{program}="ata_id --export $tempnode"
-KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
-KERNEL=="hd*[0-9]", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
-
-KERNEL=="sd*[!0-9]|sr*|st*", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394"
-KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="usb_id -x"
-KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -s %p -d $tempnode"
-KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="scsi_id -g -x -a -s %p -d $tempnode"
-KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
-KERNEL=="sd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
-
-# libata compat (links like hd*)
-KERNEL=="sd*[!0-9]|sr*", ENV{ID_VENDOR}=="ATA", PROGRAM="ata_id $tempnode", ENV{ID_ATA_COMPAT}="$result"
-KERNEL=="sd*[!0-9]|sr*", ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}"
-KERNEL=="sd*[0-9]", ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}-part%n"
-
-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}"
-KERNEL=="st*", IMPORT{program}="path_id %p", SYMLINK+="tape/by-path/$env{ID_PATH}"
-KERNEL=="sr*|st*", GOTO="persistent_storage_end"
-KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
-
-# by-label/by-uuid (filesystem properties)
-KERNEL=="*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end"
-IMPORT{program}="vol_id --export $tempnode"
-ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
-ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
-
-# BIOS Enhanced Disk Device
-KERNEL=="*[!0-9]", IMPORT{program}="edd_id --export $tempnode"
-KERNEL=="*[!0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
-KERNEL=="*[0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"
-
-LABEL="persistent_storage_end"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/etc/udev/suse/64-md-raid.rules new/udev-110/etc/udev/suse/64-md-raid.rules
--- old/udev-109/etc/udev/suse/64-md-raid.rules 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/etc/udev/suse/64-md-raid.rules 2007-05-01 14:33:39.000000000 +0200
@@ -1,11 +1,13 @@
# md links hook into "change" events, when the array becomes available
+SUBSYSTEM!="block", GOTO="md_end"
KERNEL!="md[0-9]*", GOTO="md_end"
ACTION!="add|change", GOTO="md_end"
ATTR{md/array_state}=="|clear|inactive", GOTO="md_end"
IMPORT{program}="vol_id --export $tempnode"
+OPTIONS="link_priority=100"
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/etc/udev/suse/95-udev-late.rules new/udev-110/etc/udev/suse/95-udev-late.rules
--- old/udev-109/etc/udev/suse/95-udev-late.rules 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/etc/udev/suse/95-udev-late.rules 1970-01-01 01:00:00.000000000 +0100
@@ -1,6 +0,0 @@
-# debug events to /events, but not on default udev_log="err"
-ENV{UDEV_LOG}=="[4-9]", RUN+="eventrecorder.sh"
-
-# event to be catched by udevmonitor
-RUN+="socket:/org/kernel/udev/monitor"
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/extras/ata_id/ata_id.c new/udev-110/extras/ata_id/ata_id.c
--- old/udev-109/extras/ata_id/ata_id.c 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/extras/ata_id/ata_id.c 2007-05-01 14:33:39.000000000 +0200
@@ -19,6 +19,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -91,22 +92,40 @@
char serial[21];
char revision[9];
const char *node = NULL;
- int i;
int export = 0;
int fd;
int rc = 0;
+ static const struct option options[] = {
+ { "export", 0, NULL, 'x' },
+ { "help", 0, NULL, 'h' },
+ {}
+ };
logging_init("ata_id");
- for (i = 1 ; i < argc; i++) {
- char *arg = argv[i];
+ while (1) {
+ int option;
- if (strcmp(arg, "--export") == 0) {
+ option = getopt_long(argc, argv, "xh", options, NULL);
+ if (option == -1)
+ break;
+
+ switch (option) {
+ case 'x':
export = 1;
- } else
- node = arg;
+ break;
+ case 'h':
+ printf("Usage: ata_id [--export] [--help] <device>\n"
+ " --export print values as environemt keys\n"
+ " --help print this help text\n\n");
+ default:
+ rc = 1;
+ goto exit;
+ }
}
- if (!node) {
+
+ node = argv[optind];
+ if (node == NULL) {
err("no node specified");
rc = 1;
goto exit;
@@ -120,8 +139,13 @@
}
if (ioctl(fd, HDIO_GET_IDENTITY, &id)) {
- err("HDIO_GET_IDENTITY failed for '%s'", node);
- rc = 3;
+ if (errno == ENOTTY) {
+ info("HDIO_GET_IDENTITY unsupported for '%s'", node);
+ rc = 2;
+ } else {
+ err("HDIO_GET_IDENTITY failed for '%s'", node);
+ rc = 3;
+ }
goto close;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/extras/eventrecorder.sh new/udev-110/extras/eventrecorder.sh
--- old/udev-109/extras/eventrecorder.sh 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/extras/eventrecorder.sh 1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-[ -d /events ] || exit 0
-set > /events/debug.$SEQNUM.$SUBSYSTEM.$ACTION.$$
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/extras/usb_id/usb_id.c new/udev-110/extras/usb_id/usb_id.c
--- old/udev-109/extras/usb_id/usb_id.c 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/extras/usb_id/usb_id.c 2007-05-01 14:33:39.000000000 +0200
@@ -368,10 +368,6 @@
const char *env;
char devpath[MAX_PATH_LEN];
static int export;
-
- logging_init("usb_id");
- sysfs_init();
-
static const struct option options[] = {
{ "usb-info", 0, NULL, 'u' },
{ "num-info", 0, NULL, 'n' },
@@ -380,6 +376,9 @@
{}
};
+ logging_init("usb_id");
+ sysfs_init();
+
while (1) {
int option;
@@ -399,7 +398,7 @@
export = 1;
break;
case 'h':
- printf("Usage: usb_id [--usb-info] [--num-info] [--export] [--help]\n"
+ printf("Usage: usb_id [--usb-info] [--num-info] [--export] [--help] <devpath>\n"
" --usb-info use usb strings instead\n"
" --num-info use numerical values\n"
" --export print values as environemt keys\n"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/extras/volume_id/lib/ext.c new/udev-110/extras/volume_id/lib/ext.c
--- old/udev-109/extras/volume_id/lib/ext.c 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/extras/volume_id/lib/ext.c 2007-05-01 14:33:39.000000000 +0200
@@ -94,8 +94,8 @@
volume_id_set_label_raw(id, es->s_volume_name, 16);
volume_id_set_label_string(id, es->s_volume_name, 16);
volume_id_set_uuid(id, es->s_uuid, UUID_DCE);
- snprintf(id->type_version, sizeof(id->type_version)-1,
- "%u.%u", es->s_rev_level, es->s_minor_rev_level);
+ snprintf(id->type_version, sizeof(id->type_version)-1, "%u.%u",
+ le32_to_cpu(es->s_rev_level), le16_to_cpu(es->s_minor_rev_level));
/* check for external journal device */
if ((le32_to_cpu(es->s_feature_incompat) & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) != 0) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/extras/volume_id/lib/linux_raid.c new/udev-110/extras/volume_id/lib/linux_raid.c
--- old/udev-109/extras/volume_id/lib/linux_raid.c 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/extras/volume_id/lib/linux_raid.c 2007-05-01 14:33:39.000000000 +0200
@@ -22,12 +22,13 @@
#include
#include
#include
+#include
#include "libvolume_id.h"
#include "util.h"
-static struct mdp_super_block {
- uint8_t md_magic[4];
+static struct mdp0_super_block {
+ uint32_t md_magic;
uint32_t major_version;
uint32_t minor_version;
uint32_t patch_version;
@@ -43,42 +44,121 @@
uint32_t set_uuid1;
uint32_t set_uuid2;
uint32_t set_uuid3;
-} PACKED *mdp;
+} PACKED *mdp0;
+
+struct mdp1_super_block {
+ uint32_t magic;
+ uint32_t major_version;
+ uint32_t feature_map;
+ uint32_t pad0;
+ uint8_t set_uuid[16];
+ uint8_t set_name[32];
+} PACKED *mdp1;
#define MD_RESERVED_BYTES 0x10000
-#define MD_MAGIC "\xfc\x4e\x2b\xa9"
-#define MD_MAGIC_SWAP "\xa9\x2b\x4e\xfc"
+#define MD_SB_MAGIC 0xa92b4efc
-int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size)
+static int volume_id_probe_linux_raid0(struct volume_id *id, uint64_t off, uint64_t size)
{
const uint8_t *buf;
- uint64_t sboff;
- uint8_t uuid[16];
+ union {
+ uint32_t ints[4];
+ uint8_t bytes[16];
+ } uuid;
info("probing at offset 0x%llx, size 0x%llx",
(unsigned long long) off, (unsigned long long) size);
if (size < 0x10000)
return -1;
- sboff = (size & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES;
- buf = volume_id_get_buffer(id, off + sboff, 0x800);
+ buf = volume_id_get_buffer(id, off, 0x800);
+ if (buf == NULL)
+ return -1;
+ mdp0 = (struct mdp0_super_block *) buf;
+
+ if (le32_to_cpu(mdp0->md_magic) == MD_SB_MAGIC) {
+ uuid.ints[0] = bswap_32(mdp0->set_uuid0);
+ if (le32_to_cpu(mdp0->minor_version >= 90)) {
+ uuid.ints[1] = bswap_32(mdp0->set_uuid1);
+ uuid.ints[2] = bswap_32(mdp0->set_uuid2);
+ uuid.ints[3] = bswap_32(mdp0->set_uuid3);
+ } else {
+ uuid.ints[1] = 0;
+ uuid.ints[2] = 0;
+ uuid.ints[3] = 0;
+ }
+ volume_id_set_uuid(id, uuid.bytes, UUID_DCE);
+ snprintf(id->type_version, sizeof(id->type_version)-1, "%u.%u.%u",
+ le32_to_cpu(mdp0->major_version),
+ le32_to_cpu(mdp0->minor_version),
+ le32_to_cpu(mdp0->patch_version));
+ } else if (be32_to_cpu(mdp0->md_magic) == MD_SB_MAGIC) {
+ uuid.ints[0] = mdp0->set_uuid0;
+ if (be32_to_cpu(mdp0->minor_version >= 90)) {
+ uuid.ints[1] = mdp0->set_uuid1;
+ uuid.ints[2] = mdp0->set_uuid2;
+ uuid.ints[3] = mdp0->set_uuid3;
+ } else {
+ uuid.ints[1] = 0;
+ uuid.ints[2] = 0;
+ uuid.ints[3] = 0;
+ }
+ volume_id_set_uuid(id, uuid.bytes, UUID_DCE);
+ snprintf(id->type_version, sizeof(id->type_version)-1, "%u.%u.%u",
+ be32_to_cpu(mdp0->major_version),
+ be32_to_cpu(mdp0->minor_version),
+ be32_to_cpu(mdp0->patch_version));
+ } else
+ return -1;
+
+ volume_id_set_usage(id, VOLUME_ID_RAID);
+ id->type = "linux_raid_member";
+ return 0;
+}
+
+static int volume_id_probe_linux_raid1(struct volume_id *id, uint64_t off, uint64_t size)
+{
+ const uint8_t *buf;
+
+ info("probing at offset 0x%llx, size 0x%llx",
+ (unsigned long long) off, (unsigned long long) size);
+
+ buf = volume_id_get_buffer(id, off, 0x800);
if (buf == NULL)
return -1;
- mdp = (struct mdp_super_block *) buf;
+ mdp1 = (struct mdp1_super_block *) buf;
- if ((memcmp(mdp->md_magic, MD_MAGIC, 4) != 0) &&
- (memcmp(mdp->md_magic, MD_MAGIC_SWAP, 4) != 0))
+ if (le32_to_cpu(mdp1->magic) != MD_SB_MAGIC)
return -1;
- memcpy(uuid, &mdp->set_uuid0, 4);
- memcpy(&uuid[4], &mdp->set_uuid1, 12);
- volume_id_set_uuid(id, uuid, UUID_DCE);
- snprintf(id->type_version, sizeof(id->type_version)-1, "%u.%u.%u",
- le32_to_cpu(mdp->major_version),
- le32_to_cpu(mdp->minor_version),
- le32_to_cpu(mdp->patch_version));
- dbg("found raid signature");
+ volume_id_set_uuid(id, mdp1->set_uuid, UUID_DCE);
+ volume_id_set_label_raw(id, mdp1->set_name, 32);
+ volume_id_set_label_string(id, mdp1->set_name, 32);
+ snprintf(id->type_version, sizeof(id->type_version)-1, "%u", le32_to_cpu(mdp1->major_version));
volume_id_set_usage(id, VOLUME_ID_RAID);
id->type = "linux_raid_member";
return 0;
}
+
+int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size)
+{
+ uint64_t sboff = (size & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES;
+
+ /* version 0 at the end of the device */
+ if (volume_id_probe_linux_raid0(id, off + sboff, size) == 0)
+ return 0;
+
+ /* version 1.0 at the end of the device */
+ if (volume_id_probe_linux_raid1(id, off + sboff, size) == 0)
+ return 0;
+
+ /* version 1.1 at the start of the device */
+ if (volume_id_probe_linux_raid1(id, off, size) == 0)
+ return 0;
+
+ /* version 1.2 at 4k offset from the start */
+ if (volume_id_probe_linux_raid1(id, off + 0x1000, size) == 0)
+ return 0;
+
+ return -1;
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/extras/volume_id/lib/Makefile new/udev-110/extras/volume_id/lib/Makefile
--- old/udev-109/extras/volume_id/lib/Makefile 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/extras/volume_id/lib/Makefile 2007-05-01 14:33:39.000000000 +0200
@@ -13,7 +13,7 @@
INSTALL_LIB = ${INSTALL} -m 755
SHLIB_CUR = 0
-SHLIB_REV = 75
+SHLIB_REV = 76
SHLIB_AGE = 0
SHLIB = libvolume_id.so.$(SHLIB_CUR).$(SHLIB_REV).$(SHLIB_AGE)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/extras/volume_id/lib/minix.c new/udev-110/extras/volume_id/lib/minix.c
--- old/udev-109/extras/volume_id/lib/minix.c 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/extras/volume_id/lib/minix.c 2007-05-01 14:33:39.000000000 +0200
@@ -1,7 +1,7 @@
/*
* volume_id - reads filesystem label and uuid
*
- * Copyright (C) 2005 Kay Sievers
+ * Copyright (C) 2005-2007 Kay Sievers
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -26,6 +26,14 @@
#include "libvolume_id.h"
#include "util.h"
+#define MINIX_SUPERBLOCK_OFFSET 0x400
+
+#define MINIX_SUPER_MAGIC 0x137F
+#define MINIX_SUPER_MAGIC2 0x138F
+#define MINIX2_SUPER_MAGIC 0x2468
+#define MINIX2_SUPER_MAGIC2 0x2478
+#define MINIX3_SUPER_MAGIC 0x4d5a
+
struct minix_super_block
{
uint16_t s_ninodes;
@@ -40,38 +48,63 @@
uint32_t s_zones;
} PACKED;
-#define MINIX_SUPERBLOCK_OFFSET 0x400
+struct minix3_super_block {
+ uint32_t s_ninodes;
+ uint16_t s_pad0;
+ uint16_t s_imap_blocks;
+ uint16_t s_zmap_blocks;
+ uint16_t s_firstdatazone;
+ uint16_t s_log_zone_size;
+ uint16_t s_pad1;
+ uint32_t s_max_size;
+ uint32_t s_zones;
+ uint16_t s_magic;
+ uint16_t s_pad2;
+ uint16_t s_blocksize;
+ uint8_t s_disk_version;
+} PACKED;
int volume_id_probe_minix(struct volume_id *id, uint64_t off, uint64_t size)
{
+ uint8_t *buf;
struct minix_super_block *ms;
+ struct minix3_super_block *m3s;
info("probing at offset 0x%llx", (unsigned long long) off);
- ms = (struct minix_super_block *) volume_id_get_buffer(id, off + MINIX_SUPERBLOCK_OFFSET, 0x200);
- if (ms == NULL)
+ buf = volume_id_get_buffer(id, off + MINIX_SUPERBLOCK_OFFSET, 0x200);
+ if (buf == NULL)
return -1;
- if (le16_to_cpu(ms->s_magic) == 0x137f) {
+ ms = (struct minix_super_block *) buf;
+
+ if (ms->s_magic == MINIX_SUPER_MAGIC ||
+ ms->s_magic == bswap_16(MINIX_SUPER_MAGIC)) {
strcpy(id->type_version, "1");
goto found;
}
-
- if (le16_to_cpu(ms->s_magic) == 0x1387) {
+ if (ms->s_magic == MINIX_SUPER_MAGIC2 ||
+ ms->s_magic == bswap_16(MINIX_SUPER_MAGIC2)) {
strcpy(id->type_version, "1");
goto found;
}
-
- if (le16_to_cpu(ms->s_magic) == 0x2468) {
+ if (ms->s_magic == MINIX2_SUPER_MAGIC ||
+ ms->s_magic == bswap_16(MINIX2_SUPER_MAGIC)) {
strcpy(id->type_version, "2");
goto found;
}
-
- if (le16_to_cpu(ms->s_magic) == 0x2478) {
+ if (ms->s_magic == MINIX2_SUPER_MAGIC2 ||
+ ms->s_magic == bswap_16(MINIX2_SUPER_MAGIC2)) {
strcpy(id->type_version, "2");
goto found;
}
+ m3s = (struct minix3_super_block *) buf;
+ if (m3s->s_magic == MINIX3_SUPER_MAGIC ||
+ m3s->s_magic == bswap_16(MINIX3_SUPER_MAGIC)) {
+ strcpy(id->type_version, "3");
+ goto found;
+ }
goto exit;
found:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/Makefile new/udev-110/Makefile
--- old/udev-109/Makefile 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/Makefile 2007-05-01 14:33:39.000000000 +0200
@@ -16,7 +16,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
-VERSION = 109
+VERSION = 110
# set this to make use of syslog
USE_LOG = true
@@ -113,13 +113,13 @@
AR = $(CROSS_COMPILE)ar
RANLIB = $(CROSS_COMPILE)ranlib
-CFLAGS = -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+CFLAGS += -g -Wall -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
WARNINGS = -Wstrict-prototypes -Wsign-compare -Wshadow \
-Wchar-subscripts -Wmissing-declarations -Wnested-externs \
-Wpointer-arith -Wcast-align -Wsign-compare -Wmissing-prototypes
CFLAGS += $(WARNINGS)
-LDFLAGS = -Wl,-warn-common
+LDFLAGS += -Wl,-warn-common
OPTFLAGS = -Os
CFLAGS += $(OPTFLAGS)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/RELEASE-NOTES new/udev-110/RELEASE-NOTES
--- old/udev-109/RELEASE-NOTES 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/RELEASE-NOTES 2007-05-01 14:33:39.000000000 +0200
@@ -1,3 +1,9 @@
+udev 110
+========
+Bugfixes.
+
+Removal of useless extras/eventrecorder.sh.
+
udev 109
========
Bugfixes.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/udevcontrol.c new/udev-110/udevcontrol.c
--- old/udev-109/udevcontrol.c 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/udevcontrol.c 2007-05-01 14:33:39.000000000 +0200
@@ -54,9 +54,9 @@
struct sockaddr_un saddr;
socklen_t addrlen;
const char *env;
+ const char *arg;
const char *val;
int *intval;
- int i;
int retval = 1;
env = getenv("UDEV_LOG");
@@ -70,67 +70,73 @@
fprintf(stderr, "missing command\n\n");
goto exit;
}
-
memset(&ctrl_msg, 0x00, sizeof(struct udevd_ctrl_msg));
strcpy(ctrl_msg.magic, UDEVD_CTRL_MAGIC);
+ arg = argv[1];
- for (i = 1 ; i < argc; i++) {
- char *arg = argv[i];
-
- if (!strcmp(arg, "stop_exec_queue"))
- ctrl_msg.type = UDEVD_CTRL_STOP_EXEC_QUEUE;
- else if (!strcmp(arg, "start_exec_queue"))
- ctrl_msg.type = UDEVD_CTRL_START_EXEC_QUEUE;
- else if (!strcmp(arg, "reload_rules"))
- ctrl_msg.type = UDEVD_CTRL_RELOAD_RULES;
- else if (!strncmp(arg, "log_priority=", strlen("log_priority="))) {
- intval = (int *) ctrl_msg.buf;
- val = &arg[strlen("log_priority=")];
- ctrl_msg.type = UDEVD_CTRL_SET_LOG_LEVEL;
- *intval = log_priority(val);
- info("send log_priority=%i", *intval);
- } else if (!strncmp(arg, "max_childs=", strlen("max_childs="))) {
- char *endp;
- int count;
-
- intval = (int *) ctrl_msg.buf;
- val = &arg[strlen("max_childs=")];
- ctrl_msg.type = UDEVD_CTRL_SET_MAX_CHILDS;
- count = strtoul(val, &endp, 0);
- if (endp[0] != '\0' || count < 1) {
- fprintf(stderr, "invalid number\n");
- goto exit;
- }
- *intval = count;
- info("send max_childs=%i", *intval);
- } else if (!strncmp(arg, "max_childs_running=", strlen("max_childs_running="))) {
- char *endp;
- int count;
-
- intval = (int *) ctrl_msg.buf;
- val = &arg[strlen("max_childs_running=")];
- ctrl_msg.type = UDEVD_CTRL_SET_MAX_CHILDS_RUNNING;
- count = strtoul(val, &endp, 0);
- if (endp[0] != '\0' || count < 1) {
- fprintf(stderr, "invalid number\n");
- goto exit;
- }
- *intval = count;
- info("send max_childs_running=%i", *intval);
- } else if (strcmp(arg, "help") == 0 || strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) {
- printf("Usage: udevcontrol COMMAND\n"
- " log_priority=<level> set the udev log level for the daemon\n"
- " stop_exec_queue keep udevd from executing events, queue only\n"
- " start_exec_queue execute events, flush queue\n"
- " reload_rules reloads the rules files\n"
- " max_childs=<N> maximum number of childs\n"
- " max_childs_running=<N> maximum number of childs running at the same time\n"
- " help print this help text\n\n");
+ if (!strcmp(arg, "stop_exec_queue"))
+ ctrl_msg.type = UDEVD_CTRL_STOP_EXEC_QUEUE;
+ else if (!strcmp(arg, "start_exec_queue"))
+ ctrl_msg.type = UDEVD_CTRL_START_EXEC_QUEUE;
+ else if (!strcmp(arg, "reload_rules"))
+ ctrl_msg.type = UDEVD_CTRL_RELOAD_RULES;
+ else if (!strncmp(arg, "log_priority=", strlen("log_priority="))) {
+ intval = (int *) ctrl_msg.buf;
+ val = &arg[strlen("log_priority=")];
+ ctrl_msg.type = UDEVD_CTRL_SET_LOG_LEVEL;
+ *intval = log_priority(val);
+ info("send log_priority=%i", *intval);
+ } else if (!strncmp(arg, "max_childs=", strlen("max_childs="))) {
+ char *endp;
+ int count;
+
+ intval = (int *) ctrl_msg.buf;
+ val = &arg[strlen("max_childs=")];
+ ctrl_msg.type = UDEVD_CTRL_SET_MAX_CHILDS;
+ count = strtoul(val, &endp, 0);
+ if (endp[0] != '\0' || count < 1) {
+ fprintf(stderr, "invalid number\n");
+ goto exit;
+ }
+ *intval = count;
+ info("send max_childs=%i", *intval);
+ } else if (!strncmp(arg, "max_childs_running=", strlen("max_childs_running="))) {
+ char *endp;
+ int count;
+
+ intval = (int *) ctrl_msg.buf;
+ val = &arg[strlen("max_childs_running=")];
+ ctrl_msg.type = UDEVD_CTRL_SET_MAX_CHILDS_RUNNING;
+ count = strtoul(val, &endp, 0);
+ if (endp[0] != '\0' || count < 1) {
+ fprintf(stderr, "invalid number\n");
goto exit;
- } else {
- fprintf(stderr, "unrecognized command '%s'\n", arg);
+ }
+ *intval = count;
+ info("send max_childs_running=%i", *intval);
+ } else if (!strncmp(arg, "env", strlen("env"))) {
+ val = argv[2];
+ if (val == NULL) {
+ fprintf(stderr, "missing key\n");
goto exit;
}
+ ctrl_msg.type = UDEVD_CTRL_ENV;
+ strlcpy(ctrl_msg.buf, val, sizeof(ctrl_msg.buf));
+ info("send env '%s'", val);
+ } else if (strcmp(arg, "help") == 0 || strcmp(arg, "--help") == 0 || strcmp(arg, "-h") == 0) {
+ printf("Usage: udevcontrol COMMAND\n"
+ " log_priority=<level> set the udev log level for the daemon\n"
+ " stop_exec_queue keep udevd from executing events, queue only\n"
+ " start_exec_queue execute events, flush queue\n"
+ " reload_rules reloads the rules files\n"
+ " env <var>=<value> set a global environment variable\n"
+ " max_childs=<N> maximum number of childs\n"
+ " max_childs_running=<N> maximum number of childs running at the same time\n"
+ " help print this help text\n\n");
+ goto exit;
+ } else {
+ fprintf(stderr, "unrecognized command '%s'\n", arg);
+ goto exit;
}
if (getuid() != 0) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/udevd.8 new/udev-110/udevd.8
--- old/udev-109/udevd.8 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/udevd.8 2007-05-01 14:33:39.000000000 +0200
@@ -71,6 +71,11 @@
Signal udevd to reload the rules from the config.
.RE
.PP
+\fBenv \fR\fB\fIvar\fR\fR\fB=\fR\fB\fIvalue\fR\fR
+.RS 4
+Set global variable.
+.RE
+.PP
\fBmax_childs\fR
.RS 4
Set the maximum number of events, udevd will handle at the same time.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/udevd.c new/udev-110/udevd.c
--- old/udev-109/udevd.c 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/udevd.c 2007-05-01 14:33:39.000000000 +0200
@@ -667,6 +667,7 @@
struct ucred *cred;
char cred_msg[CMSG_SPACE(sizeof(struct ucred))];
int *intval;
+ char *pos;
memset(&ctrl_msg, 0x00, sizeof(struct udevd_ctrl_msg));
iov.iov_base = &ctrl_msg;
@@ -703,6 +704,21 @@
}
switch (ctrl_msg.type) {
+ case UDEVD_CTRL_ENV:
+ pos = strchr(ctrl_msg.buf, '=');
+ if (pos == NULL) {
+ err("wrong key format '%s'", ctrl_msg.buf);
+ break;
+ }
+ pos[0] = '\0';
+ if (pos[1] == '\0') {
+ info("udevd message (ENV) received, unset '%s'", ctrl_msg.buf);
+ unsetenv(ctrl_msg.buf);
+ } else {
+ info("udevd message (ENV) received, set '%s=%s'", ctrl_msg.buf, &pos[1]);
+ setenv(ctrl_msg.buf, &pos[1], 1);
+ }
+ break;
case UDEVD_CTRL_STOP_EXEC_QUEUE:
info("udevd message (STOP_EXEC_QUEUE) received");
stop_exec_q = 1;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/udevd.h new/udev-110/udevd.h
--- old/udev-109/udevd.h 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/udevd.h 2007-05-01 14:33:39.000000000 +0200
@@ -46,6 +46,7 @@
UDEVD_CTRL_SET_MAX_CHILDS,
UDEVD_CTRL_SET_MAX_CHILDS_RUNNING,
UDEVD_CTRL_RELOAD_RULES,
+ UDEVD_CTRL_ENV,
};
struct udevd_ctrl_msg {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/udevd.xml new/udev-110/udevd.xml
--- old/udev-109/udevd.xml 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/udevd.xml 2007-05-01 14:33:39.000000000 +0200
@@ -105,6 +105,12 @@
</listitem>
</varlistentry>
<varlistentry>
+ <term><option>env <replaceable>var</replaceable>=<replaceable>value</replaceable></option></term>
+ <listitem>
+ <para>Set global variable.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term><option>max_childs</option></term>
<listitem>
<para>Set the maximum number of events, udevd will handle at the
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/udev.h new/udev-110/udev.h
--- old/udev-109/udev.h 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/udev.h 2007-05-01 14:33:39.000000000 +0200
@@ -137,6 +137,7 @@
extern int log_priority(const char *priority);
extern char *name_list_add(struct list_head *name_list, const char *name, int sort);
extern char *name_list_key_add(struct list_head *name_list, const char *key, const char *value);
+extern int name_list_key_remove(struct list_head *name_list, const char *key);
extern void name_list_cleanup(struct list_head *name_list);
extern int add_matching_files(struct list_head *name_list, const char *dirname, const char *suffix);
extern uid_t lookup_user(const char *user);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/udev_rules.c new/udev-110/udev_rules.c
--- old/udev-109/udev_rules.c 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/udev_rules.c 2007-05-01 14:33:39.000000000 +0200
@@ -532,7 +532,7 @@
}
break;
case SUBST_TEMP_NODE:
- if (udev->tmp_node[0] == '\0') {
+ if (udev->tmp_node[0] == '\0' && major(udev->devt) > 0) {
dbg("create temporary device node for callout");
snprintf(udev->tmp_node, sizeof(udev->tmp_node), "%s/.tmp-%u-%u",
udev_root, major(udev->devt), minor(udev->devt));
@@ -831,18 +831,23 @@
char temp_value[NAME_SIZE];
const char *key_name = key_pair_name(rule, pair);
const char *value = key_val(rule, &pair->key);
- char *key_value;
/* make sure we don't write to the same string we possibly read from */
strlcpy(temp_value, value, sizeof(temp_value));
udev_rules_apply_format(udev, temp_value, NAME_SIZE);
- key_value = name_list_key_add(&udev->env_list, key_name, temp_value);
- if (key_value == NULL)
- break;
+ if (temp_value[0] == '\0') {
+ name_list_key_remove(&udev->env_list, key_name);
+ unsetenv(key_name);
+ info("unset ENV '%s'", key_name);
+ } else {
+ char *key_value = name_list_key_add(&udev->env_list, key_name, temp_value);
- putenv(key_value);
- dbg("export ENV '%s'", key_value);
+ if (key_value == NULL)
+ break;
+ putenv(key_value);
+ info("set ENV '%s'", key_value);
+ }
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/udev-109/udev_utils.c new/udev-110/udev_utils.c
--- old/udev-109/udev_utils.c 2007-04-23 18:22:43.000000000 +0200
+++ new/udev-110/udev_utils.c 2007-05-01 14:33:39.000000000 +0200
@@ -110,6 +110,26 @@
return new_name->name;
}
+int name_list_key_remove(struct list_head *name_list, const char *key)
+{
+ struct name_entry *name_loop;
+ struct name_entry *temp_loop;
+ size_t keylen = strlen(key);
+ int retval = 0;
+
+ list_for_each_entry_safe(name_loop, temp_loop, name_list, node) {
+ if (strncmp(name_loop->name, key, keylen) != 0)
+ continue;
+ if (name_loop->name[keylen] != '=')
+ continue;
+ list_del(&name_loop->node);
+ free(name_loop);
+ retval = 1;
+ break;
+ }
+ return retval;
+}
+
void name_list_cleanup(struct list_head *name_list)
{
struct name_entry *name_loop;
++++++ udev-git.patch ++++++
diff --git a/etc/udev/suse/50-udev-default.rules b/etc/udev/suse/50-udev-default.rules
index d63c047..3a6a8a9 100644
--- a/etc/udev/suse/50-udev-default.rules
+++ b/etc/udev/suse/50-udev-default.rules
@@ -71,6 +71,7 @@ KERNEL=="full", MODE="622"
KERNEL=="random", MODE="666"
KERNEL=="urandom", MODE="644"
KERNEL=="rtc", MODE="600"
+KERNEL=="fuse", MODE="0666"
KERNEL=="sonypi", MODE="0666"
KERNEL=="agpgart", MODE="0600", GROUP="video"
KERNEL=="djs*", MODE="644"
@@ -128,8 +129,8 @@ KERNEL=="iseries/nvt*", NAME="%k", GROU
KERNEL=="iseries/ibmsis*", NAME="%k", GROUP="disk"
# libusb device access
+SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
SUBSYSTEM=="usb_device", ACTION=="add", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644"
-#SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
# kernel firmware loader
SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware.sh"
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org