rpms/udev/F-7 0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch, NONE, 1.1 0002-rules-fix-two-trivial-typos.patch, NONE, 1.1 0003-rules-random-and-urandom-are-0666.patch, NONE, 1.1 0004-rules-add-REMOVE_CMD-rule.patch, NONE, 1.1 0005-track-move-events-to-rename-database-and-failed-fi.patch, NONE, 1.1 0006-rules-Gentoo-update.patch, NONE, 1.1 0007-rules-add-i2o-driver-rule.patch, NONE, 1.1 0008-man-recreate-man-pages.patch, NONE, 1.1 0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch, NONE, 1.1 0010-rules-Gentoo-update.patch, NONE, 1.1 0011-add-name-substitution.patch, NONE, 1.1 0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch, NONE, 1.1 0013-print-warning-for-invalid-TEST-operations.patch, NONE, 1.1 0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch, NONE, 1.1 0015-rules-remove-broken-nvram-group-assignment-without.patch, NONE, 1.1 0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch, NONE, 1.1 0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch, NONE, 1.1 0018-correct-includes-in-udev_selinux.c.patch, NONE, 1.1 0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch, NONE, 1.1 0020-path_id-fix-for-stacked-class-devices.patch, NONE, 1.1 0021-check-line-length-after-comment-check-and-whitespace.patch, NONE, 1.1 0022-only-install-.rules.patch, NONE, 1.1 0023-ignore-device-node-names-while-restoring-symlinks-fr.patch, NONE, 1.1 0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch, NONE, 1.1 0025-rules-add-memstick-module-loading.patch, NONE, 1.1 0026-remove-extra-space-from-udevinfo-symlink-output.patch, NONE, 1.1 0027-udevinfo-simplify-symlink-printing-logic.patch, NONE, 1.1 0028-prevent-wrong-symlink-creation-if-database-disagress.patch, NONE, 1.1 0029-fix-wrong-variable-used-in-logged-string.patch, NONE, 1.1 0030-update-README.patch, NONE, 1.1 0031-rule_generator-move-all-policy-from-write_net_rules.patch, NONE, 1.1 udev-post.init, NONE, 1.1 sources, 1.43, 1.44 udev.spec, 1.210, 1.211 udev-095-dbgwait.patch, 1.1, NONE udev-106-selinuxmedia.patch, 1.1, NONE udev-106-setenv.patch, 1.1, NONE udev-extras.patch, 1.3, NONE udev-permconv.patch, 1.1, NONE udev-rules.patch, 1.38, NONE

Harald Hoyer (harald) fedora-extras-commits at redhat.com
Mon Oct 1 11:11:08 UTC 2007


Author: harald

Update of /cvs/pkgs/rpms/udev/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27554

Modified Files:
	sources udev.spec 
Added Files:
	0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch 
	0002-rules-fix-two-trivial-typos.patch 
	0003-rules-random-and-urandom-are-0666.patch 
	0004-rules-add-REMOVE_CMD-rule.patch 
	0005-track-move-events-to-rename-database-and-failed-fi.patch 
	0006-rules-Gentoo-update.patch 
	0007-rules-add-i2o-driver-rule.patch 
	0008-man-recreate-man-pages.patch 
	0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch 
	0010-rules-Gentoo-update.patch 
	0011-add-name-substitution.patch 
	0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch 
	0013-print-warning-for-invalid-TEST-operations.patch 
	0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch 
	0015-rules-remove-broken-nvram-group-assignment-without.patch 
	0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch 
	0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch 
	0018-correct-includes-in-udev_selinux.c.patch 
	0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch 
	0020-path_id-fix-for-stacked-class-devices.patch 
	0021-check-line-length-after-comment-check-and-whitespace.patch 
	0022-only-install-.rules.patch 
	0023-ignore-device-node-names-while-restoring-symlinks-fr.patch 
	0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch 
	0025-rules-add-memstick-module-loading.patch 
	0026-remove-extra-space-from-udevinfo-symlink-output.patch 
	0027-udevinfo-simplify-symlink-printing-logic.patch 
	0028-prevent-wrong-symlink-creation-if-database-disagress.patch 
	0029-fix-wrong-variable-used-in-logged-string.patch 
	0030-update-README.patch 
	0031-rule_generator-move-all-policy-from-write_net_rules.patch 
	udev-post.init 
Removed Files:
	udev-095-dbgwait.patch udev-106-selinuxmedia.patch 
	udev-106-setenv.patch udev-extras.patch udev-permconv.patch 
	udev-rules.patch 
Log Message:
new F7 kernels seem to require a udev update


0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch:

--- NEW FILE 0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch ---
>From 1f7a36f2c0953c60a8d7acadc281285a0b84fb46 Mon Sep 17 00:00:00 2001
From: Michael Morony <michael.morony at gmail.com>
Date: Fri, 24 Aug 2007 08:14:21 +0200
Subject: [PATCH] set buffer size if strlcpy/strlcat indicate truncation

---
 udev_rules.c  |    4 +++-
 udev_sysfs.c  |    2 ++
 udevinfo.c    |    2 ++
 udevmonitor.c |    4 ----
 udevtrigger.c |    2 ++
 5 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/udev_rules.c b/udev_rules.c
index 0dcbf15..35db958 100644
--- a/udev_rules.c
+++ b/udev_rules.c
@@ -475,10 +475,12 @@ static int pass_env_to_socket(const char *sockname, const char *devpath, const c
 
 	bufpos = snprintf(buf, sizeof(buf)-1, "%s@%s", action, devpath);
 	bufpos++;
-	for (i = 0; environ[i] != NULL && bufpos < sizeof(buf); i++) {
+	for (i = 0; environ[i] != NULL && bufpos < (sizeof(buf)-1); i++) {
 		bufpos += strlcpy(&buf[bufpos], environ[i], sizeof(buf) - bufpos-1);
 		bufpos++;
 	}
+	if (bufpos > sizeof(buf))
+		bufpos = sizeof(buf);
 
 	count = sendto(sock, &buf, bufpos, 0, (struct sockaddr *)&saddr, addrlen);
 	if (count < 0)
diff --git a/udev_sysfs.c b/udev_sysfs.c
index 34ae9ac..d5b04c3 100644
--- a/udev_sysfs.c
+++ b/udev_sysfs.c
@@ -355,6 +355,8 @@ char *sysfs_attr_get_value(const char *devpath, const char *attr_name)
 
 	dbg("open '%s'/'%s'", devpath, attr_name);
 	sysfs_len = strlcpy(path_full, sysfs_path, sizeof(path_full));
+	if(sysfs_len >= sizeof(path_full))
+		sysfs_len = sizeof(path_full) - 1;
 	path = &path_full[sysfs_len];
 	strlcat(path_full, devpath, sizeof(path_full));
 	strlcat(path_full, "/", sizeof(path_full));
diff --git a/udevinfo.c b/udevinfo.c
index d0b1c44..be9aa76 100644
--- a/udevinfo.c
+++ b/udevinfo.c
@@ -79,6 +79,8 @@ static void print_all_attributes(const char *devpath, const char *key)
 			if (attr_value == NULL)
 				continue;
 			len = strlcpy(value, attr_value, sizeof(value));
+			if(len >= sizeof(value))
+				len = sizeof(value) - 1;
 			dbg("attr '%s'='%s'(%zi)", dent->d_name, value, len);
 
 			/* remove trailing newlines */
diff --git a/udevmonitor.c b/udevmonitor.c
index a9cc061..644a955 100644
--- a/udevmonitor.c
+++ b/udevmonitor.c
@@ -43,7 +43,6 @@ static int init_udev_monitor_socket(void)
 {
 	struct sockaddr_un saddr;
 	socklen_t addrlen;
-	const int feature_on = 1;
 	int retval;
 
 	memset(&saddr, 0x00, sizeof(saddr));
@@ -67,9 +66,6 @@ static int init_udev_monitor_socket(void)
 		return -1;
 	}
 
-	/* enable receiving of the sender credentials */
-	setsockopt(udev_monitor_sock, SOL_SOCKET, SO_PASSCRED, &feature_on, sizeof(feature_on));
-
 	return 0;
 }
 
diff --git a/udevtrigger.c b/udevtrigger.c
index cf8f209..309c54a 100644
--- a/udevtrigger.c
+++ b/udevtrigger.c
@@ -435,6 +435,8 @@ static void scan_failed(void)
 				continue;
 
 			start = strlcpy(device, sysfs_path, sizeof(device));
+			if(start >= sizeof(device))
+				start = sizeof(device) - 1;
 			strlcat(device, dent->d_name, sizeof(device));
 			path_decode(&device[start]);
 			device_list_insert(device);
-- 
1.5.2.4


0002-rules-fix-two-trivial-typos.patch:

--- NEW FILE 0002-rules-fix-two-trivial-typos.patch ---
>From d98c6dfebc2186b841c92eeb002c03938f28cdc6 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Fri, 24 Aug 2007 20:34:44 +0200
Subject: [PATCH] rules: fix two trivial typos

Thanks to: Alexander E. Patrakov <patrakov at ums.usu.ru>
---
 etc/udev/rules.d/50-udev-default.rules |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules
index bff2fe5..b3c0cfc 100644
--- a/etc/udev/rules.d/50-udev-default.rules
+++ b/etc/udev/rules.d/50-udev-default.rules
@@ -58,7 +58,7 @@ SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{
 KERNEL=="parport[0-9]*",	GROUP="lp"
 SUBSYSTEM=="printer",		KERNEL=="lp*", GROUP="lp"
 SUBSYSTEM=="usb",		KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
-KERNEL=="lp[0-9]*",		GROUP="lp" SYMLINK+="par%n"
+KERNEL=="lp[0-9]*",		GROUP="lp", SYMLINK+="par%n"
 KERNEL=="irlpt[0-9]*",		GROUP="lp"
 
 # block, tapes, block-releated
@@ -71,7 +71,7 @@ KERNEL=="fd[0-9]",		GROUP="floppy"
 KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G floppy $root/%k"
 KERNEL=="sch[0-9]*",		GROUP="disk"
 KERNEL=="sg[0-9]*",		GROUP="disk", MODE="0640"
-KERNEL=="ht[0-9]*|nht[0-9]*",	GROUP="disk""
+KERNEL=="ht[0-9]*|nht[0-9]*",	GROUP="disk"
 KERNEL=="pg[0-9]*",		GROUP="disk"
 KERNEL=="pt[0-9]*|npt[0-9]*",	GROUP="disk"
 KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk"
-- 
1.5.2.4


0003-rules-random-and-urandom-are-0666.patch:

--- NEW FILE 0003-rules-random-and-urandom-are-0666.patch ---
>From b6e4b08dc14444790c1560108e93a67e57e1148b Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Sat, 25 Aug 2007 14:07:02 +0200
Subject: [PATCH] rules: random and urandom are 0666

Thanks to: Alexander E. Patrakov <patrakov at ums.usu.ru>.
---
 etc/udev/rules.d/50-udev-default.rules |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules
index b3c0cfc..f869f51 100644
--- a/etc/udev/rules.d/50-udev-default.rules
+++ b/etc/udev/rules.d/50-udev-default.rules
@@ -17,18 +17,16 @@ KERNEL=="hvc*|hvsi*",		GROUP="uucp"
 KERNEL=="lirc0",		SYMLINK+="lirc"
 
 # mem
-KERNEL=="null|zero|random",	MODE="0666"
+KERNEL=="null|zero|full|random|urandom", MODE="0666"
 KERNEL=="null",			SYMLINK+="XOR"
 KERNEL=="mem|kmem|port",	GROUP="kmem", MODE="0640"
 KERNEL=="nvram",		GROUP="kmem", MODE="0600"
 KERNEL=="ram0",			SYMLINK+="ramdisk"
 KERNEL=="ram1",			SYMLINK+="ram"
-KERNEL=="urandom",		MODE="0644"
-KERNEL=="full",			MODE="0666"
 
 # input
 KERNEL=="mouse*|mice|event*",	NAME="input/%k", MODE="0640"
-KERNEL=="ts[0-9]*|uinput",		NAME="input/%k", MODE="0600"
+KERNEL=="ts[0-9]*|uinput",	NAME="input/%k", MODE="0600"
 KERNEL=="js[0-9]*",		NAME="input/%k", MODE="0644", SYMLINK+="%k"
 
 # video4linux
-- 
1.5.2.4


0004-rules-add-REMOVE_CMD-rule.patch:

--- NEW FILE 0004-rules-add-REMOVE_CMD-rule.patch ---
>From 3f781cab37dbee76340c65602555a524ffea96f9 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Sun, 26 Aug 2007 00:48:49 +0200
Subject: [PATCH] rules: add REMOVE_CMD rule

---
 etc/udev/rules.d/95-udev-late.rules |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/etc/udev/rules.d/95-udev-late.rules b/etc/udev/rules.d/95-udev-late.rules
index 1755d08..4a015b9 100644
--- a/etc/udev/rules.d/95-udev-late.rules
+++ b/etc/udev/rules.d/95-udev-late.rules
@@ -1,5 +1,8 @@
 # do not edit this file, it will be overwritten on update
 
+# run a command on remove events
+ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}"
+
 # event to be catched by udevmonitor
 RUN+="socket:/org/kernel/udev/monitor"
 
-- 
1.5.2.4


0005-track-move-events-to-rename-database-and-failed-fi.patch:

--- NEW FILE 0005-track-move-events-to-rename-database-and-failed-fi.patch ---
>From a2f2270eef499f6f60075a149011e3e3851ab5ef Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Sun, 26 Aug 2007 05:22:35 +0200
Subject: [PATCH] track "move" events to rename database and failed files

---
 udev.h        |    2 ++
 udev_db.c     |   10 ++++++++++
 udev_device.c |    4 ++++
 udevd.c       |   54 ++++++++++++++++++++++++++++++++++++++++++------------
 udevd.h       |    1 +
 5 files changed, 59 insertions(+), 12 deletions(-)

diff --git a/udev.h b/udev.h
index f13eb83..33b39aa 100644
--- a/udev.h
+++ b/udev.h
@@ -69,6 +69,7 @@ struct udevice {
 	struct sysfs_device dev_local;
 	struct sysfs_device *dev_parent;	/* current parent device used for matching */
 	char action[NAME_SIZE];
+	char *devpath_old;
 
 	/* node */
 	char name[PATH_SIZE];
@@ -131,6 +132,7 @@ extern int udev_node_remove(struct udevice *udev);
 /* udev_db.c */
 extern int udev_db_add_device(struct udevice *dev);
 extern int udev_db_delete_device(struct udevice *dev);
+extern int udev_db_rename(const char *devpath_old, const char *devpath);
 extern int udev_db_get_device(struct udevice *udev, const char *devpath);
 extern int udev_db_get_devices_by_name(const char *name, struct list_head *name_list);
 extern int udev_db_get_all_entries(struct list_head *name_list);
diff --git a/udev_db.c b/udev_db.c
index abc1e5a..29aa031 100644
--- a/udev_db.c
+++ b/udev_db.c
@@ -117,6 +117,16 @@ out:
 	return rc;
 }
 
+int udev_db_rename(const char *devpath_old, const char *devpath)
+{
+	char filename[PATH_SIZE];
+	char filename_old[PATH_SIZE];
+
+	devpath_to_db_path(devpath_old, filename_old, sizeof(filename_old));
+	devpath_to_db_path(devpath, filename, sizeof(filename));
+	return rename(filename_old, filename);
+}
+
 int udev_db_add_device(struct udevice *udev)
 {
 	char filename[PATH_SIZE];
diff --git a/udev_device.c b/udev_device.c
index 23ba313..2b7ffe0 100644
--- a/udev_device.c
+++ b/udev_device.c
@@ -168,6 +168,10 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev)
 {
 	int retval = 0;
 
+	if (udev->devpath_old != NULL)
+		if (udev_db_rename(udev->devpath_old, udev->dev->devpath) == 0)
+			info("moved database from '%s' to '%s'", udev->devpath_old, udev->dev->devpath);
+
 	/* add device node */
 	if (major(udev->devt) != 0 &&
 	    (strcmp(udev->action, "add") == 0 || strcmp(udev->action, "change") == 0)) {
diff --git a/udevd.c b/udevd.c
index 8f56de6..3c46617 100644
--- a/udevd.c
+++ b/udevd.c
@@ -130,6 +130,7 @@ static int udev_event_process(struct udevd_uevent_msg *msg)
 		return -1;
 	strlcpy(udev->action, msg->action, sizeof(udev->action));
 	sysfs_device_set_values(udev->dev, msg->devpath, msg->subsystem, msg->driver);
+	udev->devpath_old = msg->devpath_old;
 	udev->devt = msg->devt;
 
 	retval = udev_device_event(&rules, udev);
@@ -156,14 +157,14 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st
 	struct udevd_uevent_msg *loop_msg;
 	int fd;
 
-	/* add location of queue files */
+	/* location of queue file */
 	strlcpy(filename, udev_root, sizeof(filename));
 	strlcat(filename, "/", sizeof(filename));
 	start = strlcat(filename, EVENT_QUEUE_DIR"/", sizeof(filename));
 	strlcat(filename, msg->devpath, sizeof(filename));
 	path_encode(&filename[start], sizeof(filename) - start);
 
-	/* add location of failed files */
+	/* location of failed file */
 	strlcpy(filename_failed, udev_root, sizeof(filename_failed));
 	strlcat(filename_failed, "/", sizeof(filename_failed));
 	start = strlcat(filename_failed, EVENT_FAILED_DIR"/", sizeof(filename_failed));
@@ -174,6 +175,7 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st
 	case EVENT_QUEUED:
 		unlink(filename_failed);
 		delete_path(filename_failed);
+
 		create_path(filename);
 		fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0644);
 		if (fd > 0)
@@ -181,10 +183,25 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st
 		return;
 	case EVENT_FINISHED:
 	case EVENT_FAILED:
-		unlink(filename_failed);
-		delete_path(filename_failed);
+		if (msg->devpath_old != NULL) {
+			/* "move" event - rename failed file to current name, do not delete failed */
+			char filename_failed_old[PATH_SIZE];
+
+			strlcpy(filename_failed_old, udev_root, sizeof(filename_failed_old));
+			strlcat(filename_failed_old, "/", sizeof(filename_failed_old));
+			start = strlcat(filename_failed_old, EVENT_FAILED_DIR"/", sizeof(filename_failed_old));
+			strlcat(filename_failed_old, msg->devpath_old, sizeof(filename_failed_old));
+			path_encode(&filename_failed_old[start], sizeof(filename) - start);
+
+			if (rename(filename_failed_old, filename_failed) == 0)
+				info("renamed devpath, moved failed state of '%s' to %s'",
+				     msg->devpath_old, msg->devpath);
+		} else {
+			unlink(filename_failed);
+			delete_path(filename_failed);
+		}
 
-		/* don't remove, if events for the same path are still pending */
+		/* skip if events for the same path are still pending */
 		list_for_each_entry(loop_msg, &running_list, node)
 			if (loop_msg->devpath && strcmp(loop_msg->devpath, msg->devpath) == 0)
 				return;
@@ -193,7 +210,7 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st
 			if (loop_msg->devpath && strcmp(loop_msg->devpath, msg->devpath) == 0)
 				return;
 
-		/* move failed events to the failed directory */
+		/* move failed event to the failed directory */
 		if (state == EVENT_FAILED) {
 			create_path(filename_failed);
 			rename(filename, filename_failed);
@@ -201,7 +218,7 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st
 			unlink(filename);
 		}
 
-		/* clean up the queue directory */
+		/* clean up possibly empty queue directory */
 		delete_path(filename);
 
 		return;
@@ -212,7 +229,7 @@ static void msg_queue_delete(struct udevd_uevent_msg *msg)
 {
 	list_del(&msg->node);
 
-	/* mark as failed, if add event returns non-zero */
+	/* mark as failed, if "add" event returns non-zero */
 	if (msg->exitstatus && strcmp(msg->action, "add") == 0)
 		export_event_state(msg, EVENT_FAILED);
 	else
@@ -280,6 +297,7 @@ static void msg_queue_insert(struct udevd_uevent_msg *msg)
 	}
 
 	export_event_state(msg, EVENT_QUEUED);
+	info("seq %llu forked, '%s' '%s'", msg->seqnum, msg->action, msg->subsystem);
 
 	/* run one event after the other in debug mode */
 	if (debug_trace) {
@@ -469,11 +487,16 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit)
 		if (loop_msg->seqnum >= msg->seqnum)
 			break;
 
+		/* check our old name */
+		if (msg->devpath_old != NULL)
+			if (strcmp(loop_msg->devpath , msg->devpath_old) == 0)
+				return 2;
+
 		/* check identical, parent, or child device event */
 		if (compare_devpath(loop_msg->devpath, msg->devpath) != 0) {
 			dbg("%llu, device event still pending %llu (%s)",
 			    msg->seqnum, loop_msg->seqnum, loop_msg->devpath);
-			return 2;
+			return 3;
 		}
 
 		/* check physical device event (special case of parent) */
@@ -481,7 +504,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit)
 			if (compare_devpath(loop_msg->devpath, msg->physdevpath) != 0) {
 				dbg("%llu, physical device event still pending %llu (%s)",
 				    msg->seqnum, loop_msg->seqnum, loop_msg->devpath);
-				return 3;
+				return 4;
 			}
 	}
 
@@ -492,11 +515,16 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit)
 			return 1;
 		}
 
+		/* check our old name */
+		if (msg->devpath_old != NULL)
+			if (strcmp(loop_msg->devpath , msg->devpath_old) == 0)
+				return 2;
+
 		/* check identical, parent, or child device event */
 		if (compare_devpath(loop_msg->devpath, msg->devpath) != 0) {
 			dbg("%llu, device event still running %llu (%s)",
 			    msg->seqnum, loop_msg->seqnum, loop_msg->devpath);
-			return 2;
+			return 3;
 		}
 
 		/* check physical device event (special case of parent) */
@@ -504,7 +532,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit)
 			if (compare_devpath(loop_msg->devpath, msg->physdevpath) != 0) {
 				dbg("%llu, physical device event still running %llu (%s)",
 				    msg->seqnum, loop_msg->seqnum, loop_msg->devpath);
-				return 3;
+				return 4;
 			}
 	}
 	return 0;
@@ -588,6 +616,8 @@ static struct udevd_uevent_msg *get_msg_from_envbuf(const char *buf, int buf_siz
 			msg->driver = &key[7];
 		else if (strncmp(key, "SEQNUM=", 7) == 0)
 			msg->seqnum = strtoull(&key[7], NULL, 10);
+		else if (strncmp(key, "DEVPATH_OLD=", 12) == 0)
+			msg->devpath_old = &key[12];
 		else if (strncmp(key, "PHYSDEVPATH=", 12) == 0)
 			msg->physdevpath = &key[12];
 		else if (strncmp(key, "PHYSDEVDRIVER=", 14) == 0)
diff --git a/udevd.h b/udevd.h
index 4ca6d1d..9be34cb 100644
--- a/udevd.h
+++ b/udevd.h
@@ -66,6 +66,7 @@ struct udevd_uevent_msg {
 	char *driver;
 	dev_t devt;
 	unsigned long long seqnum;
+	char *devpath_old;
 	char *physdevpath;
 	unsigned int timeout;
 	char *envp[UEVENT_NUM_ENVP+1];
-- 
1.5.2.4


0006-rules-Gentoo-update.patch:

--- NEW FILE 0006-rules-Gentoo-update.patch ---
>From 2bf0a506bc13abc5632079232bee6f8784934633 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Sun, 26 Aug 2007 13:54:32 +0200
Subject: [PATCH] rules: Gentoo update

---
 etc/udev/gentoo/05-udev-early.rules |    7 ++--
 etc/udev/gentoo/50-udev.rules       |    8 +----
 etc/udev/gentoo/80-drivers.rules    |   44 ++++++++++++++++++++++++++++
 etc/udev/gentoo/80-hotplug.rules    |   54 -----------------------------------
 etc/udev/gentoo/90-network.rules    |    8 +++++
 etc/udev/gentoo/95-udev-late.rules  |   18 -----------
 6 files changed, 57 insertions(+), 82 deletions(-)
 create mode 100644 etc/udev/gentoo/80-drivers.rules
 delete mode 100644 etc/udev/gentoo/80-hotplug.rules
 create mode 100644 etc/udev/gentoo/90-network.rules
 delete mode 100644 etc/udev/gentoo/95-udev-late.rules

diff --git a/etc/udev/gentoo/05-udev-early.rules b/etc/udev/gentoo/05-udev-early.rules
index ee349dc..fc15e2b 100644
--- a/etc/udev/gentoo/05-udev-early.rules
+++ b/etc/udev/gentoo/05-udev-early.rules
@@ -1,9 +1,8 @@
-# ignore these events until someone needs them
-SUBSYSTEM=="drivers",	OPTIONS="ignore_device"
-SUBSYSTEM=="module",	OPTIONS="ignore_device"
+# do not edit this file, it will be overwritten on update
 
 # sysfs is populated after the event is sent
-ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
 ACTION=="add", KERNEL=="[0-9]*:[0-9]*", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
+ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
 ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
 ACTION=="add", SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver"
+
diff --git a/etc/udev/gentoo/50-udev.rules b/etc/udev/gentoo/50-udev.rules
index dd32971..9e06029 100644
--- a/etc/udev/gentoo/50-udev.rules
+++ b/etc/udev/gentoo/50-udev.rules
@@ -1,13 +1,9 @@
+# do not edit this file, it will be overwritten on update
+
 # /etc/udev/rules/50-udev.rules:  device naming rules for udev
 #
 # Gentoo specific rules
 #
-# There are a number of modifiers that are allowed to be used in some of the
-# fields.  See the udev man page for a full description of them.
-#
-# Try not to modify this file, if you wish to change things, create a new rule
-# file that can be run before this one.
-#
 
 # Net devices can have arbitrary names, even
 # ones set by the user. Not try to match normal
diff --git a/etc/udev/gentoo/80-drivers.rules b/etc/udev/gentoo/80-drivers.rules
new file mode 100644
index 0000000..df6c880
--- /dev/null
+++ b/etc/udev/gentoo/80-drivers.rules
@@ -0,0 +1,44 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION!="add", GOTO="drivers_end"
+
+# check if the device has already been claimed by a driver
+ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="drivers_end"
+
+# this driver is broken and should not be loaded automatically
+SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="drivers_end"
+
+# Autoload modules that lack aliases but have them defined in autoload modules
+ENV{MODALIAS}=="?*", RUN{ignore_error}+="modprobe.sh $env{MODALIAS}"
+
+# /etc/modprobe.conf.
+SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN{ignore_error}+="/bin/sh -c 'while read id; do /lib/udev/modprobe.sh pnp:d$$id; done < /sys$devpath/id'"
+# needed aliases are defined in /etc/modprobe.d/pnp-aliases
+
+
+SUBSYSTEM=="i2o",  RUN+="modprobe.sh i2o_block"
+SUBSYSTEM=="mmc",  RUN+="modprobe.sh mmc_block"
+SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_sd"
+SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_ms"
+SUBSYSTEM=="ide",  ATTR{media}=="tape", RUN+="modprobe.sh ide-scsi"
+
+# Load driver for scsi-device
+SUBSYSTEM!="scsi_device", GOTO="hotplug_scsi_end"
+
+	# Parts taken from redhat-rules
+	# sd:           0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
+	# sr:           4 TYPE_WORM, 5 TYPE_ROM
+	# st/osst:      1 TYPE_TAPE
+
+	ATTRS{type}=="?*",	TEST!="[module/sg]", RUN+="modprobe.sh sg"
+	ATTRS{type}=="0|7|14",	RUN+="modprobe.sh sd_mod"
+	ATTRS{type}=="4|5",	RUN+="modprobe.sh sr_mod"
+	ATTRS{type}=="8",	RUN+="modprobe.sh ch"
+
+	ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \
+		ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="hotplug_scsi_end"
+	ATTRS{type}=="1", RUN+="modprobe.sh st"
+LABEL="hotplug_scsi_end"
+
+LABEL="drivers_end"
+
diff --git a/etc/udev/gentoo/80-hotplug.rules b/etc/udev/gentoo/80-hotplug.rules
deleted file mode 100644
index 0637dbc..0000000
--- a/etc/udev/gentoo/80-hotplug.rules
+++ /dev/null
@@ -1,54 +0,0 @@
-# /etc/udev/rules/80-hotplug.rules:  module loading rules for udev
-#
-# Gentoo specific rules
-#
-# There are a number of modifiers that are allowed to be used in some of the
-# fields.  See the udev man page for a full description of them.
-#
-# Try not to modify this file, if you wish to change things, create a new rule
-# file that can be run before this one.
-#
-
-# Module autoloading
-ACTION!="add", GOTO="hotplug_load_end"
-
-# check if the device has already been claimed by a driver
-ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="hotplug_load_end"
-
-# this driver is broken and should not be loaded automatically
-SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="hotplug_load_end"
-
-# Autoload modules that lack aliases but have them defined in autoload modules
-ENV{MODALIAS}=="?*", RUN{ignore_error}+="modprobe.sh $env{MODALIAS}"
-
-# /etc/modprobe.conf.
-SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN{ignore_error}+="/bin/sh -c 'while read id; do /lib/udev/modprobe.sh pnp:d$$id; done < /sys$devpath/id'"
-# needed aliases are defined in /etc/modprobe.d/pnp-aliases
-
-
-SUBSYSTEM=="i2o",  RUN+="modprobe.sh i2o_block"
-SUBSYSTEM=="mmc",  RUN+="modprobe.sh mmc_block"
-SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_sd"
-SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_ms"
-SUBSYSTEM=="ide",  ATTR{media}=="tape", RUN+="modprobe.sh ide-scsi"
-
-# Load driver for scsi-device
-SUBSYSTEM!="scsi_device", GOTO="hotplug_scsi_end"
-
-	# Parts taken from redhat-rules
-	# sd:           0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
-	# sr:           4 TYPE_WORM, 5 TYPE_ROM
-	# st/osst:      1 TYPE_TAPE
-
-	ATTRS{type}=="?*",	TEST!="[module/sg]", RUN+="modprobe.sh sg"
-	ATTRS{type}=="0|7|14",	RUN+="modprobe.sh sd_mod"
-	ATTRS{type}=="4|5",	RUN+="modprobe.sh sr_mod"
-	ATTRS{type}=="8",	RUN+="modprobe.sh ch"
-
-	ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \
-		ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="hotplug_scsi_end"
-	ATTRS{type}=="1", RUN+="modprobe.sh st"
-LABEL="hotplug_scsi_end"
-
-LABEL="hotplug_load_end"
-
diff --git a/etc/udev/gentoo/90-network.rules b/etc/udev/gentoo/90-network.rules
new file mode 100644
index 0000000..50903af
--- /dev/null
+++ b/etc/udev/gentoo/90-network.rules
@@ -0,0 +1,8 @@
+# do not edit this file, it will be overwritten on update
+
+# /etc/udev/rules/90-network.rules:  triggering network init-scripts
+
+# Activate our network if we can
+SUBSYSTEM=="net", ACTION=="add",    RUN+="net.sh %k start"
+SUBSYSTEM=="net", ACTION=="remove", RUN+="net.sh %k stop"
+
diff --git a/etc/udev/gentoo/95-udev-late.rules b/etc/udev/gentoo/95-udev-late.rules
deleted file mode 100644
index 40ada28..0000000
--- a/etc/udev/gentoo/95-udev-late.rules
+++ /dev/null
@@ -1,18 +0,0 @@
-# /etc/udev/rules/95-udev-late.rules:  device naming rules for udev
-#
-# Gentoo specific rules
-#
-# There are a number of modifiers that are allowed to be used in some of the
-# fields.  See the udev man page for a full description of them.
-#
-# Try not to modify this file, if you wish to change things, create a new rule
-# file that can be run before this one.
-#
-
-# Activate our network if we can
-SUBSYSTEM=="net", ACTION=="add",    RUN+="net.sh %k start"
-SUBSYSTEM=="net", ACTION=="remove", RUN+="net.sh %k stop"
-
-# event to be catched by udevmonitor
-RUN+="socket:/org/kernel/udev/monitor"
-
-- 
1.5.2.4


0007-rules-add-i2o-driver-rule.patch:

--- NEW FILE 0007-rules-add-i2o-driver-rule.patch ---
>From 79ef8431c952349d9f31c899adb579c3ff83a80b Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Tue, 28 Aug 2007 04:16:54 +0200
Subject: [PATCH] rules: add i2o driver rule

---
 etc/udev/rules.d/80-drivers.rules |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/etc/udev/rules.d/80-drivers.rules b/etc/udev/rules.d/80-drivers.rules
index e71f135..3388266 100644
--- a/etc/udev/rules.d/80-drivers.rules
+++ b/etc/udev/rules.d/80-drivers.rules
@@ -7,6 +7,7 @@ SUBSYSTEM=="pnp", DRIVER!="?*", ENV{MODALIAS}!="?*", \
   RUN{ignore_error}+="/bin/sh -c '/sbin/modprobe -a $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'"
 SUBSYSTEM=="tifm", RUN+="/sbin/modprobe --all tifm_sd tifm_ms"
 SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block"
+SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o_block"
 SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi"
 SUBSYSTEM=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe sg"
 
-- 
1.5.2.4


0008-man-recreate-man-pages.patch:

--- NEW FILE 0008-man-recreate-man-pages.patch ---
>From dbb2c414d77362a9279f4fc50458054f71ffb7e2 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Tue, 28 Aug 2007 04:24:08 +0200
Subject: [PATCH] man: recreate man pages

---
 extras/volume_id/vol_id.8 |   28 ++++----
 udev.7                    |  182 ++++++++++++++++++++++-----------------------
 udevd.8                   |   38 +++++-----
 udevinfo.8                |   28 ++++----
 udevmonitor.8             |   16 ++--
 udevsettle.8              |   12 ++--
 udevstart.8               |    8 +-
 udevtest.8                |    8 +-
 udevtrigger.8             |   28 ++++----
 9 files changed, 172 insertions(+), 176 deletions(-)

diff --git a/extras/volume_id/vol_id.8 b/extras/volume_id/vol_id.8
index 7594253..daa583b 100644
--- a/extras/volume_id/vol_id.8
+++ b/extras/volume_id/vol_id.8
@@ -1,6 +1,6 @@
 .\"     Title: vol_id
 .\"    Author: 
-.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
+.\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
 .\"      Date: March 2006
 .\"    Manual: vol_id
 .\"    Source: volume_id
@@ -11,69 +11,69 @@
 .\" disable justification (adjust text to left margin only)
 .ad l
 .SH "NAME"
-vol_id \- probe filesystem type and read label and uuid
+vol_id - probe filesystem type and read label and uuid
 .SH "SYNOPSIS"
 .HP 7
 \fBvol_id\fR [\fB\-\-export\fR] [\fB\-\-type\fR] [\fB\-\-label\fR] [\fB\-\-label\-raw\fR] [\fB\-\-uuid\fR] [\fB\-\-skip\-raid\fR] [\fB\-\-probe\-all\fR] [\fB\-\-help\fR] [\fIdevice\fR]
 .SH "DESCRIPTION"
 .PP
 \fBvol_id\fR
-is usually called from a udev rule, to provide udev with the filesystem type, the label and the uuid of a volume. It supports most of the common filesystem formats and detects various raid setups to prevent the recognition of raid members as a volume with a filesystem.
+is usually called from a udev rule, to provide udev with the filesystem type, the label and the uuid of a volume\. It supports most of the common filesystem formats and detects various raid setups to prevent the recognition of raid members as a volume with a filesystem\.
 .SH "OPTIONS"
 .PP
 \fB\-\-export\fR
 .RS 4
-Print all values in key/value format to import them into the environment.
+Print all values in key/value format to import them into the environment\.
 .RE
 .PP
 \fB\-\-type\fR
 .RS 4
-Print the filesystem type.
+Print the filesystem type\.
 .RE
 .PP
 \fB\-\-label\fR
 .RS 4
-Print the safe version of volume label suitable for use as filename.
+Print the safe version of volume label suitable for use as filename\.
 .RE
 .PP
 \fB\-\-label\-raw\fR
 .RS 4
-Print the raw volume label.
+Print the raw volume label\.
 .RE
 .PP
 \fB\-\-uuid\fR
 .RS 4
-Print the uuid of a volume.
+Print the uuid of a volume\.
 .RE
 .PP
 \fB\-\-skip\-raid\fR
 .RS 4
-Skip detection of raid metadata.
+Skip detection of raid metadata\.
 .RE
 .PP
 \fB\-\-probe\-all\fR
 .RS 4
-Probe for all types and print all matches.
+Probe for all types and print all matches\.
 .RE
 .PP
 \fB\-\-help\fR
 .RS 4
-Print usage.
+Print usage\.
 .RE
 .SH "ENVIRONMENT"
 .PP
 \fBUDEV_LOG\fR
 .RS 4
-Set the syslog priority.
+Set the syslog priority\.
 .RE
 .SH "EXIT STATUS"
 .PP
 \fBvol_id\fR
-will only return successful if the value asked for is not empty. All trailing whitespace will be removed, spaces replaced by underscore and slashes ignored.
+will only return successful if the value asked for is not empty\. All trailing whitespace will be removed, spaces replaced by underscore and slashes ignored\.
 .SH "AUTHOR"
 .PP
 Written by Kay Sievers
-<kay.sievers at vrfy.org>
+<kay\.sievers at vrfy\.org>
 .SH "SEE ALSO"
 .PP
 \fBudev\fR(7)
diff --git a/udev.7 b/udev.7
index 821a476..5f0ebb9 100644
--- a/udev.7
+++ b/udev.7
@@ -1,6 +1,6 @@
 .\"     Title: udev
 .\"    Author: 
-.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
+.\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
 .\"      Date: August 2005
 .\"    Manual: udev
 .\"    Source: udev
@@ -11,213 +11,213 @@
 .\" disable justification (adjust text to left margin only)
 .ad l
 .SH "NAME"
-udev \- dynamic device management
+udev - dynamic device management
 .SH "DESCRIPTION"
 .PP
-udev provides a dynamic device directory containing only the files for actually present devices. It creates or removes device node files in the
+udev provides a dynamic device directory containing only the files for actually present devices\. It creates or removes device node files in the
 \fI/dev\fR
-directory, or it renames network interfaces.
+directory, or it renames network interfaces\.
 .PP
 Usually udev runs as
 \fBudevd\fR(8)
-and receives uevents directly from the kernel if a device is added or removed from the system.
+and receives uevents directly from the kernel if a device is added or removed from the system\.
 .PP
-If udev receives a device event, it matches its configured rules against the available device attributes provided in sysfs to identify the device. Rules that match may provide additional device information or specify a device node name and multiple symlink names and instruct udev to run additional programs as part of the device event handling.
+If udev receives a device event, it matches its configured rules against the available device attributes provided in sysfs to identify the device\. Rules that match may provide additional device information or specify a device node name and multiple symlink names and instruct udev to run additional programs as part of the device event handling\.
 .SH "CONFIGURATION"
 .PP
 All udev configuration files are placed in
-\fI/etc/udev/*\fR. Every file consists of a set of lines of text. All empty lines or lines beginning with '#' will be ignored.
+\fI/etc/udev/*\fR\. Every file consists of a set of lines of text\. All empty lines or lines beginning with \'#\' will be ignored\.
 .SS "Configuration file"
 .PP
 udev expects its main configuration file at
-\fI/etc/udev/udev.conf\fR. It consists of a set of variables allowing the user to override default udev values. The following variables can be set:
+\fI/etc/udev/udev\.conf\fR\. It consists of a set of variables allowing the user to override default udev values\. The following variables can be set:
 .PP
 \fBudev_root\fR
 .RS 4
-Specifies where to place the device nodes in the filesystem. The default value is
-\fI/dev\fR.
+Specifies where to place the device nodes in the filesystem\. The default value is
+\fI/dev\fR\.
 .RE
 .PP
 \fBudev_rules\fR
 .RS 4
 The name of the udev rules file or directory to look for files with the suffix
-\fI.rules\fR. Multiple rule files are read in lexical order. The default value is
-\fI/etc/udev/rules.d\fR.
+\fI\.rules\fR\. Multiple rule files are read in lexical order\. The default value is
+\fI/etc/udev/rules\.d\fR\.
 .RE
 .PP
 \fBudev_log\fR
 .RS 4
-The logging priority. Valid values are the numerical syslog priorities or their textual representations:
+The logging priority\. Valid values are the numerical syslog priorities or their textual representations:
 \fBerr\fR,
 \fBinfo\fR
 and
-\fBdebug\fR.
+\fBdebug\fR\.
 .RE
 .SS "Rules files"
 .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.
+\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\.
 .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.
+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 consist 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:
+A rule may consist 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
 \fB==\fR
 .RS 4
-Compare for equality.
+Compare for equality\.
 .RE
 .PP
 \fB!=\fR
 .RS 4
-Compare for non\-equality.
+Compare for non\-equality\.
 .RE
 .PP
 \fB=\fR
 .RS 4
-Assign a value to a key. Keys that represent a list, are reset and only this single value is assigned.
+Assign a value to a key\. Keys that represent a list, are reset and only this single value is assigned\.
 .RE
 .PP
 \fB+=\fR
 .RS 4
-Add the value to a key that holds a list of entries.
+Add the value to a key that holds a list of entries\.
 .RE
 .PP
 \fB:=\fR
 .RS 4
-Assign a value to a key finally; disallow any later changes, which may be used to prevent changes by any later rules.
+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. 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.
+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
-Match the name of the event action.
+Match the name of the event action\.
 .RE
 .PP
 \fBDEVPATH\fR
 .RS 4
-Match the devpath of the event device.
+Match the devpath of the event device\.
 .RE
 .PP
 \fBKERNEL\fR
 .RS 4
-Match the name of the event device.
+Match the name of the event device\.
 .RE
 .PP
 \fBSUBSYSTEM\fR
 .RS 4
-Match the subsystem of the event device.
+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.
+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
+Match sysfs attribute values of the event device\. Up to five
 \fBATTR\fR
-keys can be specified per rule. Trailing whitespace in the attribute values is ignored, if the specified match value does not contain trailing whitespace itself. Depending on the type of operator, this key is also used to set the value of a sysfs attribute.
+keys can be specified per rule\. Trailing whitespace in the attribute values is ignored, if the specified match value does not contain trailing whitespace itself\. Depending on the type of operator, this key is also used to set the value of a sysfs attribute\.
 .RE
 .PP
 \fBKERNELS\fR
 .RS 4
-Search the devpath upwards for a matching device name.
+Search the devpath upwards for a matching device name\.
 .RE
 .PP
 \fBSUBSYSTEMS\fR
 .RS 4
-Search the devpath upwards for a matching device subsystem name.
+Search the devpath upwards for a matching device subsystem name\.
 .RE
 .PP
 \fBDRIVERS\fR
 .RS 4
-Search the devpath upwards for a matching device driver name.
+Search the devpath upwards for a matching device driver name\.
 .RE
 .PP
 \fBATTRS{\fR\fB\fIfilename\fR\fR\fB}\fR
 .RS 4
-Search the devpath upwards for a device with matching sysfs attribute values. Up to five
+Search the devpath upwards for a device with matching sysfs attribute values\. Up to five
 \fBATTRS\fR
-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.
+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
 .RS 4
-Match against the value of an environment variable. Up to five
+Match against the value of an environment variable\. Up to five
 \fBENV\fR
-keys can be specified per rule. Depending on the type of operator, this key is also used to export a variable to the environment.
+keys can be specified per rule\. Depending on the type of operator, this key is also used to export a variable to the environment\.
 .RE
 .PP
 \fBTEST{\fR\fB\fIoctal mode mask\fR\fR\fB}\fR
 .RS 4
-Test the existence of a file. An octal mode mask can be specified if needed.
+Test the existence of a file\. An octal mode mask can be specified if needed\.
 .RE
 .PP
 \fBPROGRAM\fR
 .RS 4
-Execute external program. The key is true, if the program returns with exit code zero. The whole event environment is available to the executed program. The program's output printed to stdout, is available in the RESULT key.
+Execute external program\. The key is true, if the program returns with exit code zero\. The whole event environment is available to the executed program\. The program\'s output printed to stdout, is available in the RESULT key\.
 .RE
 .PP
 \fBRESULT\fR
 .RS 4
-Match the returned string of the last PROGRAM call. This key can be used in the same or in any later rule after a PROGRAM call.
+Match the returned string of the last PROGRAM call\. This key can be used in the same or in any later rule after a PROGRAM call\.
 .RE
 .PP
-Most of the fields support a shell style pattern matching. The following pattern characters are supported:
+Most of the fields support a shell style pattern matching\. The following pattern characters are supported:
 .PP
 \fB*\fR
 .RS 4
-Matches zero, or any number of characters.
+Matches zero, or any number of characters\.
 .RE
 .PP
 \fB?\fR
 .RS 4
-Matches any single character.
+Matches any single character\.
 .RE
 .PP
 \fB[]\fR
 .RS 4
-Matches any single character specified within the brackets. For example, the pattern string 'tty[SR]' would match either 'ttyS' or 'ttyR'. Ranges are also supported within this match with the '\-' character. For example, to match on the range of all digits, the pattern [0\-9] would be used. If the first character following the '[' is a '!', any characters not enclosed are matched.
+Matches any single character specified within the brackets\. For example, the pattern string \'tty[SR]\' would match either \'ttyS\' or \'ttyR\'\. Ranges are also supported within this match with the \'\-\' character\. For example, to match on the range of all digits, the pattern [0\-9] would be used\. If the first character following the \'[\' is a \'!\', any characters not enclosed are matched\.
 .RE
 .PP
 The following keys can get values assigned:
 .PP
 \fBNAME\fR
 .RS 4
-The name of the node to be created, or the name the network interface should be renamed to. Only one rule can set the node name, all later rules with a NAME key will be ignored.
+The name of the node to be created, or the name the network interface should be renamed to\. Only one rule can set the node name, all later rules with a NAME key will be ignored\.
 .RE
 .PP
 \fBSYMLINK\fR
 .RS 4
-The name of a symlink targeting the node. Every matching rule can add this value to the list of symlinks to be created along with the device node. Multiple symlinks may be specified by separating the names by the space character.
+The name of a symlink targeting the node\. Every matching rule can add this value to the list of symlinks to be created along with the device node\. Multiple symlinks may be specified by separating the names by the space character\.
 .RE
 .PP
 \fBOWNER, GROUP, MODE\fR
 .RS 4
-The permissions for the device node. Every specified value overwrites the compiled\-in default value.
+The permissions for the device node\. Every specified value overwrites the compiled\-in default value\.
 .RE
 .PP
 \fBATTR{\fR\fB\fIkey\fR\fR\fB}\fR
 .RS 4
-The value that should be written to a sysfs attribute of the event device. Depending on the type of operator, this key is also used to match against the value of a sysfs attribute.
+The value that should be written to a sysfs attribute of the event device\. Depending on the type of operator, this key is also used to match against the value of a sysfs attribute\.
 .RE
 .PP
 \fBENV{\fR\fB\fIkey\fR\fR\fB}\fR
 .RS 4
-Export a variable to the environment. Depending on the type of operator, this key is also to match against an environment variable.
+Export a variable to the environment\. Depending on the type of operator, this key is also to match against an environment variable\.
 .RE
 .PP
 \fBRUN\fR
 .RS 4
-Add a program to the list of programs to be executed for a specific device. This can only be used for very short running tasks. Running an event process for a long period of time may block all further events for this or a dependent device. Long running tasks need to be immediately detached from the event process itself.
+Add a program to the list of programs to be executed for a specific device\. This can only be used for very short running tasks\. Running an event process for a long period of time may block all further events for this or a dependent device\. Long running tasks need to be immediately detached from the event process itself\.
 .RE
 .PP
 \fBLABEL\fR
 .RS 4
-Named label where a GOTO can jump to.
+Named label where a GOTO can jump to\.
 .RE
 .PP
 \fBGOTO\fR
@@ -229,72 +229,68 @@ Jumps to the next LABEL with a matching name
 .RS 4
 Import a set of variables into the event environment, depending on
 \fItype\fR:
-.RS 4
 .PP
 \fBprogram\fR
 .RS 4
-Execute an external program specified as the assigned value and import its output, which must be in environment key format.
+Execute an external program specified as the assigned value and import its output, which must be in environment key format\.
 .RE
 .PP
 \fBfile\fR
 .RS 4
-Import a text file specified as the assigned value, which must be in environment key format.
+Import a text file specified as the assigned value, which must be in environment key format\.
 .RE
 .PP
 \fBparent\fR
 .RS 4
-Import the stored keys from the parent device by reading the database entry of the parent device. The value assigned to
+Import the stored keys from the parent device by reading the database entry of the parent device\. The value assigned to
 \fBIMPORT{parent}\fR
-is used as a filter of key names to import (with the same shell\-style pattern matching used for comparisons).
-.RE
+is used as a filter of key names to import (with the same shell\-style pattern matching used for comparisons)\.
 .RE
-.IP "" 4
+.sp
 If no option is given, udev will choose between
 \fBprogram\fR
 and
 \fBfile\fR
-based on the executable bit of the file permissions.
+based on the executable bit of the file permissions\.
 .RE
 .PP
 \fBWAIT_FOR_SYSFS\fR
 .RS 4
-Wait for the specified sysfs file of the device to be created. Can be used to fight against kernel sysfs timing issues.
+Wait for the specified sysfs file of the device to be created\. Can be used to fight against kernel sysfs timing issues\.
 .RE
 .PP
 \fBOPTIONS\fR
 .RS 4
 Rule and device options:
-.RS 4
 .PP
 \fBlast_rule\fR
 .RS 4
-Stops further rules application. No later rules will have any effect.
+Stops further rules application\. No later rules will have any effect\.
 .RE
 .PP
 \fBignore_device\fR
 .RS 4
-Ignore this event completely.
+Ignore this event completely\.
 .RE
 .PP
 \fBignore_remove\fR
 .RS 4
-Ignore any later remove event for this device. This may be useful as a workaround for broken device drivers.
+Ignore any later remove event for this device\. This may be useful as a workaround for broken device drivers\.
 .RE
 .PP
 \fBlink_priority=\fR\fB\fIvalue\fR\fR
 .RS 4
-Specify the priority of the created symlinks. Devices with higher priorities overwrite existing symlinks of other devices.
+Specify the priority of the created symlinks\. Devices with higher priorities overwrite existing symlinks of other devices\.
 .RE
 .PP
 \fBall_partitions\fR
 .RS 4
-Create the device nodes for all available partitions of a block device. This may be useful for removable media devices where media changes are not detected.
+Create the device nodes for all available partitions of a block device\. This may be useful for removable media devices where media changes are not detected\.
 .RE
 .PP
 \fBstring_escape=\fR\fB\fInone|replace\fR\fR
 .RS 4
-Usually control and other possibly unsafe characters are replaced in strings used for device naming. The mode of replacement can be specified with this option.
-.RE
+Usually control and other possibly unsafe characters are replaced in strings used for device naming\. The mode of replacement can be specified with this option\.
 .RE
 .RE
 .PP
@@ -306,23 +302,23 @@ The
 \fBGROUP\fR
 and
 \fBRUN\fR
-fields support simple printf\-like string substitutions. The
+fields support simple printf\-like string substitutions\. The
 \fBRUN\fR
-format chars gets applied after all rules have been processed, right before the program is executed. It allows the use of the complete environment set by earlier matching rules. For all other fields, substitutions are applied while the individual rule is being processed. The available substitutions are:
+format chars gets applied after all rules have been processed, right before the program is executed\. It allows the use of the complete environment set by earlier matching rules\. For all other fields, substitutions are applied while the individual rule is being processed\. The available substitutions are:
 .PP
 \fB$kernel\fR, \fB%k\fR
 .RS 4
-The kernel name for this device.
+The kernel name for this device\.
 .RE
 .PP
 \fB$number\fR, \fB%n\fR
 .RS 4
-The kernel number for this device. For example, 'sda3' has kernel number of '3'
+The kernel number for this device\. For example, \'sda3\' has kernel number of \'3\'
 .RE
 .PP
 \fB$devpath\fR, \fB%p\fR
 .RS 4
-The devpath of the device.
+The devpath of the device\.
 .RE
 .PP
 \fB$id\fR, \fB%b\fR
@@ -332,7 +328,7 @@ The name of the device matched while searching the devpath upwards for
 \fBKERNELS\fR,
 \fBDRIVERS\fR
 and
-\fBATTRS\fR.
+\fBATTRS\fR\.
 .RE
 .PP
 \fB$driver\fR, \fB%d\fR
@@ -342,75 +338,75 @@ The driver name of the device matched while searching the devpath upwards for
 \fBKERNELS\fR,
 \fBDRIVERS\fR
 and
-\fBATTRS\fR.
+\fBATTRS\fR\.
 .RE
 .PP
 \fB$attr{\fR\fB\fIfile\fR\fR\fB}\fR, \fB%s{\fR\fB\fIfile\fR\fR\fB}\fR
 .RS 4
-The value of a sysfs attribute found at the device, where all keys of the rule have matched. If the matching device does not have such an attribute, all devices along the chain of parents are searched for a matching attribute. If the attribute is a symlink, the last element of the symlink target is returned as the value.
+The value of a sysfs attribute found at the device, where all keys of the rule have matched\. If the matching device does not have such an attribute, all devices along the chain of parents are searched for a matching attribute\. If the attribute is a symlink, the last element of the symlink target is returned as the value\.
 .RE
 .PP
 \fB$env{\fR\fB\fIkey\fR\fR\fB}\fR, \fB%E{\fR\fB\fIkey\fR\fR\fB}\fR
 .RS 4
-The value of an environment variable.
+The value of an environment variable\.
 .RE
 .PP
 \fB$major\fR, \fB%M\fR
 .RS 4
-The kernel major number for the device.
+The kernel major number for the device\.
 .RE
 .PP
 \fB$minor\fR, \fB%m\fR
 .RS 4
-The kernel minor number for the device.
+The kernel minor number for the device\.
 .RE
 .PP
 \fB$result\fR, \fB%c\fR
 .RS 4
-The string returned by the external program requested with PROGRAM. A single part of the string, separated by a space character may be selected by specifying the part number as an attribute:
-\fB%c{N}\fR. If the number is followed by the '+' char this part plus all remaining parts of the result string are substituted:
+The string returned by the external program requested with PROGRAM\. A single part of the string, separated by a space character may be selected by specifying the part number as an attribute:
+\fB%c{N}\fR\. If the number is followed by the \'+\' char this part plus all remaining parts of the result string are substituted:
 \fB%c{N+}\fR
 .RE
 .PP
 \fB$parent\fR, \fB%P\fR
 .RS 4
-The node name of the parent device.
+The node name of the parent device\.
 .RE
 .PP
 \fB$root\fR, \fB%r\fR
 .RS 4
-The udev_root value.
+The udev_root value\.
 .RE
 .PP
 \fB$sys\fR, \fB%S\fR
 .RS 4
-The sysfs mount point.
+The sysfs mount point\.
 .RE
 .PP
 \fB$tempnode\fR, \fB%N\fR
 .RS 4
-The name of a created temporary device node to provide access to the device from a external program before the real node is created.
+The name of a created temporary device node to provide access to the device from a external program before the real node is created\.
 .RE
 .PP
 \fB%%\fR
 .RS 4
-The '%' character itself.
+The \'%\' character itself\.
 .RE
 .PP
 \fB$$\fR
 .RS 4
-The '$' character itself.
+The \'$\' character itself\.
 .RE
 .PP
-The count of characters to be substituted may be limited by specifying the format length value. For example, '%3s{file}' will only insert the first three characters of the sysfs attribute
+The count of characters to be substituted may be limited by specifying the format length value\. For example, \'%3s{file}\' will only insert the first three characters of the sysfs attribute
 .SH "AUTHOR"
 .PP
 Written by Greg Kroah\-Hartman
-<greg at kroah.com>
+<greg at kroah\.com>
 and Kay Sievers
-<kay.sievers at vrfy.org>. With much help from Dan Stekloff
-<dsteklof at us.ibm.com>
-and many others.
+<kay\.sievers at vrfy\.org>\. With much help from Dan Stekloff
+<dsteklof at us\.ibm\.com>
+and many others\.
 .SH "SEE ALSO"
 .PP
 \fBudevd\fR(8),
diff --git a/udevd.8 b/udevd.8
index 25996d1..46edde4 100644
--- a/udevd.8
+++ b/udevd.8
@@ -1,6 +1,6 @@
 .\"     Title: udevd
 .\"    Author: 
-.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
+.\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
 .\"      Date: August 2005
 .\"    Manual: udevd, udevcontrol
 .\"    Source: udev
@@ -11,7 +11,7 @@
 .\" disable justification (adjust text to left margin only)
 .ad l
 .SH "NAME"
-udevd \- event managing daemon
+udevd - event managing daemon
 .SH "SYNOPSIS"
 .HP 6
 \fBudevd\fR [\fB\-\-daemon\fR] [\fB\-\-debug\-trace\fR] [\fB\-\-verbose\fR] [\fB\-\-version\fR] [\fB\-\-help\fR]
@@ -19,87 +19,87 @@ udevd \- event managing daemon
 \fBudevcontrol \fR\fB\fIcommand\fR\fR
 .SH "DESCRIPTION"
 .PP
-udevd listens to kernel uevents and passes the incoming events to udev. It ensures the right event order and takes care, that events for child devices are delayed until the parent has finished the device handling.
+udevd listens to kernel uevents and passes the incoming events to udev\. It ensures the right event order and takes care, that events for child devices are delayed until the parent has finished the device handling\.
 .SH "OPTIONS"
 .PP
 \fB\-\-daemon\fR
 .RS 4
-Detach and run in the background.
+Detach and run in the background\.
 .RE
 .PP
 \fB\-\-debug\-trace\fR
 .RS 4
-Run all events completely serialized. This may be useful if udev triggers actions or loads kernel modules which cause problems and a slow but continuous operation is needed, where no events are processed in parallel.
+Run all events completely serialized\. This may be useful if udev triggers actions or loads kernel modules which cause problems and a slow but continuous operation is needed, where no events are processed in parallel\.
 .RE
 .PP
 \fB\-\-verbose\fR
 .RS 4
-Print log messages to stdout.
+Print log messages to stdout\.
 .RE
 .PP
 \fB\-\-version\fR
 .RS 4
-Print version number.
+Print version number\.
 .RE
 .PP
 \fB\-\-help\fR
 .RS 4
-Print usage.
+Print usage\.
 .RE
 .PP
 \fBlog_priority=\fR\fB\fIvalue\fR\fR
 .RS 4
-Set the internal log level of udevd. Valid values are the numerical syslog priorities or their textual representations:
+Set the internal log level of udevd\. Valid values are the numerical syslog priorities or their textual representations:
 \fBerr\fR,
 \fBinfo\fR
 and
-\fBdebug\fR.
+\fBdebug\fR\.
 .RE
 .PP
 \fBstop_exec_queue\fR
 .RS 4
-Signal udevd to stop executing new events. Incoming events will be queued.
+Signal udevd to stop executing new events\. Incoming events will be queued\.
 .RE
 .PP
 \fBstart_exec_queue\fR
 .RS 4
-Signal udevd to enable the execution of events.
+Signal udevd to enable the execution of events\.
 .RE
 .PP
 \fBreload_rules\fR
 .RS 4
-Signal udevd to reload the rules from the config.
+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.
+Set global variable\.
 .RE
 .PP
 \fBmax_childs\fR
 .RS 4
-Set the maximum number of events, udevd will handle at the same time.
+Set the maximum number of events, udevd will handle at the same time\.
 .RE
 .PP
 \fBmax_childs_running\fR
 .RS 4
-Set the maximum number of events, which are allowed to run at the same time.
+Set the maximum number of events, which are allowed to run at the same time\.
 .RE
 .PP
 \fBhelp\fR
 .RS 4
-Print help text.
+Print help text\.
 .RE
 .SH "ENVIRONMENT"
 .PP
 \fBUDEV_LOG\fR
 .RS 4
-Overrides the syslog priority specified in the config file.
+Overrides the syslog priority specified in the config file\.
 .RE
 .SH "AUTHOR"
 .PP
 Written by Kay Sievers
-<kay.sievers at vrfy.org>.
+<kay\.sievers at vrfy\.org>\.
 .SH "SEE ALSO"
 .PP
 \fBudev\fR(7)
diff --git a/udevinfo.8 b/udevinfo.8
index 337f206..6115f29 100644
--- a/udevinfo.8
+++ b/udevinfo.8
@@ -1,6 +1,6 @@
 .\"     Title: udevinfo
 .\"    Author: 
-.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
+.\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
 .\"      Date: August 2005
 .\"    Manual: udevinfo
 .\"    Source: udev
@@ -11,32 +11,32 @@
 .\" disable justification (adjust text to left margin only)
 .ad l
 .SH "NAME"
-udevinfo \- query udev device information
+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]
 .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.
+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\.
 .SH "OPTIONS"
 .PP
 \fB\-\-query=\fR\fB\fItype\fR\fR
 .RS 4
-Query the database for specified type of device data. It needs the
+Query the database for specified type of device data\. It needs the
 \fB\-\-path\fR
 or
 \fB\-\-name\fR
-to identify the specified device. Valid queries are:
+to identify the specified device\. Valid queries are:
 \fBname\fR,
 \fBsymlink\fR,
 \fBpath\fR,
 \fBenv\fR,
-\fBall\fR.
+\fBall\fR\.
 .RE
 .PP
 \fB\-\-path=\fR\fB\fIdevpath\fR\fR
 .RS 4
-The devpath of the device to query.
+The devpath of the device to query\.
 .RE
 .PP
 \fB\-\-name=\fR\fB\fInode\fR\fR
@@ -47,36 +47,36 @@ The name of the device node or a symlink to query
 \fB\-\-root\fR
 .RS 4
 The udev root directory:
-\fI/dev\fR. If used in conjunction with a
+\fI/dev\fR\. If used in conjunction with a
 \fBname\fR
 or
 \fBsymlink\fR
-query, the query returns the absolute path including the root directory.
+query, the query returns the absolute path including the root directory\.
 .RE
 .PP
 \fB\-\-attribute\-walk\fR
 .RS 4
-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.
+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\-db\fR
 .RS 4
-Export the content of the udev database.
+Export the content of the udev database\.
 .RE
 .PP
 \fB\-\-version\fR
 .RS 4
-Print version.
+Print version\.
 .RE
 .PP
 \fB\-\-help\fR
 .RS 4
-Print help text.
+Print help text\.
 .RE
 .SH "AUTHOR"
 .PP
 Written by Kay Sievers
-<kay.sievers at vrfy.org>.
+<kay\.sievers at vrfy\.org>\.
 .SH "SEE ALSO"
 .PP
 \fBudev\fR(7)
diff --git a/udevmonitor.8 b/udevmonitor.8
index 0adb998..5b624a7 100644
--- a/udevmonitor.8
+++ b/udevmonitor.8
@@ -1,6 +1,6 @@
 .\"     Title: udevmonitor
 .\"    Author: 
-.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
+.\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
 .\"      Date: August 2005
 .\"    Manual: udevmonitor
 .\"    Source: udev
@@ -11,38 +11,38 @@
 .\" disable justification (adjust text to left margin only)
 .ad l
 .SH "NAME"
-udevmonitor \- print the kernel and udev event sequence to the console
+udevmonitor - print the kernel and udev event sequence to the console
 .SH "SYNOPSIS"
 .HP 12
 \fBudevmonitor\fR [\fB\-\-environment\fR] [\fB\-\-kernel\fR] [\fB\-\-udev\fR] [\fB\-\-help\fR]
 .SH "DESCRIPTION"
 .PP
-udevmonitor listens to the kernel uevents and events sent out by a udev rule and prints the devpath of the event to the console. It can be used to analyze the event timing, by comparing the timestamps of the kernel uevent and the udev event.
+udevmonitor listens to the kernel uevents and events sent out by a udev rule and prints the devpath of the event to the console\. It can be used to analyze the event timing, by comparing the timestamps of the kernel uevent and the udev event\.
 .SH "OPTIONS"
 .PP
 \fB\-\-environment\fR
 .RS 4
-Print the complete environment for all events. Can be used to compare the kernel supplied and the udev added environment values.
+Print the complete environment for all events\. Can be used to compare the kernel supplied and the udev added environment values\.
 .RE
 .PP
 \fB\-\-kernel\fR
 .RS 4
-Print the kernel uevents.
+Print the kernel uevents\.
 .RE
 .PP
 \fB\-\-udev\fR
 .RS 4
-Print the udev event after the rule processing.
+Print the udev event after the rule processing\.
 .RE
 .PP
 \fB\-\-help\fR
 .RS 4
-Print usage.
+Print usage\.
 .RE
 .SH "AUTHOR"
 .PP
 Written by Kay Sievers
-<kay.sievers at vrfy.org>.
+<kay\.sievers at vrfy\.org>\.
 .SH "SEE ALSO"
 .PP
 \fBudev\fR(7)
diff --git a/udevsettle.8 b/udevsettle.8
index 818a7ff..39054d9 100644
--- a/udevsettle.8
+++ b/udevsettle.8
@@ -1,6 +1,6 @@
 .\"     Title: udevsettle
 .\"    Author: 
-.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
+.\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
 .\"      Date: March 2006
 .\"    Manual: udevsettle
 .\"    Source: udev
@@ -11,29 +11,29 @@
 .\" disable justification (adjust text to left margin only)
 .ad l
 .SH "NAME"
-udevsettle \- wait until queued kernel/udev events are handled
+udevsettle - wait until queued kernel/udev events are handled
 .SH "SYNOPSIS"
 .HP 11
 \fBudevsettle\fR [\fB\-\-timeout=\fR\fB\fIseconds\fR\fR]
 .SH "DESCRIPTION"
 .PP
-Waits watching the udev event queue and exits if all current events are handled.
+Waits watching the udev event queue and exits if all current events are handled\.
 .SH "OPTIONS"
 .PP
 \fB\-\-timeout=\fR\fB\fIseconds\fR\fR
 .RS 4
-maximum seconds to wait for the queue to become empty.
+maximum seconds to wait for the queue to become empty\.
 .RE
 .SH "ENVIRONMENT"
 .PP
 \fBUDEV_LOG\fR
 .RS 4
-Overrides the syslog priority specified in the config file.
+Overrides the syslog priority specified in the config file\.
 .RE
 .SH "AUTHOR"
 .PP
 Written by Kay Sievers
-<kay.sievers at vrfy.org>.
+<kay\.sievers at vrfy\.org>\.
 .SH "SEE ALSO"
 .PP
 \fBudev\fR(7)
diff --git a/udevstart.8 b/udevstart.8
index ac7d070..6b463cf 100644
--- a/udevstart.8
+++ b/udevstart.8
@@ -1,6 +1,6 @@
 .\"     Title: udevstart
 .\"    Author: 
-.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
+.\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
 .\"      Date: August 2005
 .\"    Manual: udevstart
 .\"    Source: udev
@@ -11,17 +11,17 @@
 .\" disable justification (adjust text to left margin only)
 .ad l
 .SH "NAME"
-udevstart \- populate initial device directory
+udevstart - populate initial device directory
 .SH "SYNOPSIS"
 .HP 10
 \fBudevstart\fR
 .SH "DESCRIPTION"
 .PP
-udevstart scans the kernel exported device information available in sysfs for devices which require a device node to operate and creates the node using the specified udev rules. udevstart is used to create the initial device directory after system bootup.
+udevstart scans the kernel exported device information available in sysfs for devices which require a device node to operate and creates the node using the specified udev rules\. udevstart is used to create the initial device directory after system bootup\.
 .SH "AUTHOR"
 .PP
 Written by Harald Hoyer
-<harald at redhat.com>.
+<harald at redhat\.com>\.
 .SH "SEE ALSO"
 .PP
 \fBudev\fR(7)
diff --git a/udevtest.8 b/udevtest.8
index 9ab9249..a090465 100644
--- a/udevtest.8
+++ b/udevtest.8
@@ -1,6 +1,6 @@
 .\"     Title: udevtest
 .\"    Author: 
-.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
+.\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
 .\"      Date: August 2005
 .\"    Manual: udevtest
 .\"    Source: udev
@@ -11,17 +11,17 @@
 .\" disable justification (adjust text to left margin only)
 .ad l
 .SH "NAME"
-udevtest \- simulate a udev run and print the action to the console
+udevtest - simulate a udev run and print the action to the console
 .SH "SYNOPSIS"
 .HP 21
 \fBudevtest \fR\fB\fIdevice\-path\fR\fR
 .SH "DESCRIPTION"
 .PP
-udevtest simulates a udev run for the given device and prints out the name of the node udev would have created, or the name of the network interface, that would have been renamed.
+udevtest simulates a udev run for the given device and prints out the name of the node udev would have created, or the name of the network interface, that would have been renamed\.
 .SH "AUTHOR"
 .PP
 Written by Greg Kroah\-Hartman
-<greg at kroah.com>.
+<greg at kroah\.com>\.
 .SH "SEE ALSO"
 .PP
 \fBudev\fR(7)
diff --git a/udevtrigger.8 b/udevtrigger.8
index 5ef9e8f..06c7e45 100644
--- a/udevtrigger.8
+++ b/udevtrigger.8
@@ -1,6 +1,6 @@
 .\"     Title: udevtrigger
 .\"    Author: 
-.\" Generator: DocBook XSL Stylesheets v1.72.0 <http://docbook.sf.net/>
+.\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
 .\"      Date: March 2006
 .\"    Manual: udevtrigger
 .\"    Source: udev
@@ -11,66 +11,66 @@
 .\" disable justification (adjust text to left margin only)
 .ad l
 .SH "NAME"
-udevtrigger \- request kernel devices events for coldplug
+udevtrigger - request kernel devices events for coldplug
 .SH "SYNOPSIS"
 .HP 12
 \fBudevtrigger\fR [\fB\-\-verbose\fR] [\fB\-\-dry\-run\fR] [\fB\-\-retry\-failed\fR] [\fB\-\-help\fR] [\fB\-\-action=\fR\fB\fIaction\fR\fR] [\fB\-\-subsystem\-match=\fR\fB\fIsubsystem\fR\fR] [\fB\-\-subsystem\-nomatch=\fR\fB\fIsubsystem\fR\fR] [\fB\-\-attr\-match=\fR\fB\fIattribute=value\fR\fR] [\fB\-\-attr\-nomatch=\fR\fB\fIattribute=value\fR\fR]
 .SH "DESCRIPTION"
 .PP
-Trigger kernel device uevents to replay missing events at system coldplug.
+Trigger kernel device uevents to replay missing events at system coldplug\.
 .SH "OPTIONS"
 .PP
 \fB\-\-verbose\fR
 .RS 4
-Print the list of devices which will be triggered.
+Print the list of devices which will be triggered\.
 .RE
 .PP
 \fB\-\-dry\-run\fR
 .RS 4
-Do not actually trigger the event.
+Do not actually trigger the event\.
 .RE
 .PP
 \fB\-\-retry\-failed\fR
 .RS 4
-Trigger only the events which are failed during a previous run.
+Trigger only the events which are failed during a previous run\.
 .RE
 .PP
 \fB\-\-action=\fR\fB\fIaction\fR\fR
 .RS 4
-Type of event to be triggered. The default value is "add".
+Type of event to be triggered\. The default value is "add"\.
 .RE
 .PP
 \fB\-\-subsystem\-match=\fR\fB\fIsubsystem\fR\fR
 .RS 4
-Trigger events for devices which belong to a matching subsystem. This option can be specified multiple times and supports shell style pattern matching.
+Trigger events for devices which belong to a matching subsystem\. This option can be specified multiple times and supports shell style pattern matching\.
 .RE
 .PP
 \fB\-\-subsystem\-nomatch=\fR\fB\fIsubsystem\fR\fR
 .RS 4
-Do not trigger events for devices which belong to a matching subsystem. This option can be specified multiple times and supports shell style pattern matching.
+Do not trigger events for devices which belong to a matching subsystem\. This option can be specified multiple times and supports shell style pattern matching\.
 .RE
 .PP
 \fB\-\-attr\-match=\fR\fB\fIattribute=value\fR\fR
 .RS 4
-Trigger events for devices with a matching sysfs attribute. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching. If no value is specified, the existence of the sysfs attribute is checked. This option can be specified multiple times.
+Trigger events for devices with a matching sysfs attribute\. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\. If no value is specified, the existence of the sysfs attribute is checked\. This option can be specified multiple times\.
 .RE
 .PP
 \fB\-\-attr\-nomatch\fR\fB\fIattribute=value\fR\fR
 .RS 4
-Do not trigger events for devices with a matching sysfs attribute. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching. If no value is specified, the existence of the sysfs attribute is checked. This option can be specified multiple times.
+Do not trigger events for devices with a matching sysfs attribute\. If a value is specified along with the attribute name, the content of the attribute is matched against the given value using shell style pattern matching\. If no value is specified, the existence of the sysfs attribute is checked\. This option can be specified multiple times\.
 .RE
 .SH "ENVIRONMENT"
 .PP
 \fBUDEV_LOG\fR
 .RS 4
-Overrides the syslog priority specified in the config file.
+Overrides the syslog priority specified in the config file\.
 .RE
 .SH "AUTHOR"
 .PP
 Written by Kay Sievers
-<kay.sievers at vrfy.org>
+<kay\.sievers at vrfy\.org>
 and Hannes Reinecke
-<hare at suse.de>.
+<hare at suse\.de>\.
 .SH "SEE ALSO"
 .PP
 \fBudev\fR(7)
-- 
1.5.2.4


0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch:

--- NEW FILE 0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch ---
>From 7b6fd01651ce89e4985f9afc344b7d49c4e5fcd7 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Wed, 29 Aug 2007 06:06:00 +0200
Subject: [PATCH] volume_id: fix linux_raid metadata version 1.0 detection

Fixes:
  https://bugs.launchpad.net/ubuntu/+source/udev/+bug/133773
---
 extras/volume_id/lib/linux_raid.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/extras/volume_id/lib/linux_raid.c b/extras/volume_id/lib/linux_raid.c
index 6d1d19c..ff2c47c 100644
--- a/extras/volume_id/lib/linux_raid.c
+++ b/extras/volume_id/lib/linux_raid.c
@@ -142,13 +142,15 @@ static int volume_id_probe_linux_raid1(struct volume_id *id, uint64_t off, uint6
 
 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;
+	uint64_t sboff;
 
 	/* version 0 at the end of the device */
+	sboff = (size & ~(MD_RESERVED_BYTES - 1)) - MD_RESERVED_BYTES;
 	if (volume_id_probe_linux_raid0(id, off + sboff, size) == 0)
 		return 0;
 
 	/* version 1.0 at the end of the device */
+	sboff = (size & ~(0x1000 - 1)) - 0x2000;
 	if (volume_id_probe_linux_raid1(id, off + sboff, size) == 0)
 		return 0;
 
-- 
1.5.2.4


0010-rules-Gentoo-update.patch:

--- NEW FILE 0010-rules-Gentoo-update.patch ---
>From 739b614721580b95aebdfd295eebb0a6246803ad Mon Sep 17 00:00:00 2001
From: Matthias Schwarzott <zzam at gentoo.org>
Date: Wed, 29 Aug 2007 13:19:16 +0200
Subject: [PATCH] rules: Gentoo update

---
 etc/udev/gentoo/05-udev-early.rules    |    8 -----
 etc/udev/gentoo/30-kernel-compat.rules |   47 ++++++++++++++++++++++++++++++++
 etc/udev/gentoo/50-udev.rules          |    4 ---
 etc/udev/gentoo/80-drivers.rules       |   44 -----------------------------
 4 files changed, 47 insertions(+), 56 deletions(-)
 delete mode 100644 etc/udev/gentoo/05-udev-early.rules
 create mode 100644 etc/udev/gentoo/30-kernel-compat.rules
 delete mode 100644 etc/udev/gentoo/80-drivers.rules

diff --git a/etc/udev/gentoo/05-udev-early.rules b/etc/udev/gentoo/05-udev-early.rules
deleted file mode 100644
index fc15e2b..0000000
--- a/etc/udev/gentoo/05-udev-early.rules
+++ /dev/null
@@ -1,8 +0,0 @@
-# do not edit this file, it will be overwritten on update
-
-# sysfs is populated after the event is sent
-ACTION=="add", KERNEL=="[0-9]*:[0-9]*", SUBSYSTEM=="scsi", WAIT_FOR_SYSFS="ioerr_cnt"
-ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
-ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
-ACTION=="add", SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver"
-
diff --git a/etc/udev/gentoo/30-kernel-compat.rules b/etc/udev/gentoo/30-kernel-compat.rules
new file mode 100644
index 0000000..7bc55c6
--- /dev/null
+++ b/etc/udev/gentoo/30-kernel-compat.rules
@@ -0,0 +1,47 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION!="add", GOTO="kernel_compat_end"
+
+# workarounds needed to synchronize with sysfs
+DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", WAIT_FOR_SYSFS="bus"
+
+# needed for kernels <2.6.16
+SUBSYSTEM=="net", WAIT_FOR_SYSFS="address"
+
+# needed for kernels <2.6.17
+SUBSYSTEM=="net", ENV{PHYSDEVDRIVER}=="?*", WAIT_FOR_SYSFS="device/driver"
+
+
+
+# needed for kernels <2.6.22
+SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="usb", MODE="0664"
+
+
+
+# this driver is broken and should not be loaded automatically
+# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=398962
+# needed for kernels <2.6.21
+SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", ENV{MODALIAS}=""
+
+# No need for more code, as MODALIAS is present
+ENV{MODALIAS}=="?*", GOTO="kernel_compat_end"
+
+# needed for kernels <2.6.22
+SUBSYSTEM!="scsi_device", GOTO="kernel_compat_end"
+
+	# Parts taken from redhat-rules
+	# sd:           0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
+	# sr:           4 TYPE_WORM, 5 TYPE_ROM
+	# st/osst:      1 TYPE_TAPE
+
+	ATTRS{type}=="0|7|14",	RUN+="modprobe.sh sd_mod"
+	ATTRS{type}=="4|5",	RUN+="modprobe.sh sr_mod"
+	ATTRS{type}=="8",	RUN+="modprobe.sh ch"
+
+	ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \
+		ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="kernel_compat_end"
+	ATTRS{type}=="1", RUN+="modprobe.sh st"
+
+LABEL="kernel_compat_end"
+
+
diff --git a/etc/udev/gentoo/50-udev.rules b/etc/udev/gentoo/50-udev.rules
index 9e06029..7c2ac81 100644
--- a/etc/udev/gentoo/50-udev.rules
+++ b/etc/udev/gentoo/50-udev.rules
@@ -237,10 +237,6 @@ KERNEL=="umad*",	NAME="infiniband/%k"
 KERNEL=="issm*",	NAME="infiniband/%k"
 
 
-# usbfs-like device nodes
-# the way to go up to kernel 2.6.21 (and above if setting USB_DEVICE_CLASS=y)
-SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="usb", MODE="0664"
-# starting from kernel 2.6.22 use this rule
 SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \
 	NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", GROUP="usb", MODE="0664" 
 
diff --git a/etc/udev/gentoo/80-drivers.rules b/etc/udev/gentoo/80-drivers.rules
deleted file mode 100644
index df6c880..0000000
--- a/etc/udev/gentoo/80-drivers.rules
+++ /dev/null
@@ -1,44 +0,0 @@
-# do not edit this file, it will be overwritten on update
-
-ACTION!="add", GOTO="drivers_end"
-
-# check if the device has already been claimed by a driver
-ENV{DRIVER}=="?*", SUBSYSTEM!="input", GOTO="drivers_end"
-
-# this driver is broken and should not be loaded automatically
-SUBSYSTEM=="platform", ENV{MODALIAS}=="i82365", GOTO="drivers_end"
-
-# Autoload modules that lack aliases but have them defined in autoload modules
-ENV{MODALIAS}=="?*", RUN{ignore_error}+="modprobe.sh $env{MODALIAS}"
-
-# /etc/modprobe.conf.
-SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN{ignore_error}+="/bin/sh -c 'while read id; do /lib/udev/modprobe.sh pnp:d$$id; done < /sys$devpath/id'"
-# needed aliases are defined in /etc/modprobe.d/pnp-aliases
-
-
-SUBSYSTEM=="i2o",  RUN+="modprobe.sh i2o_block"
-SUBSYSTEM=="mmc",  RUN+="modprobe.sh mmc_block"
-SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_sd"
-SUBSYSTEM=="tifm", RUN+="modprobe.sh tifm_ms"
-SUBSYSTEM=="ide",  ATTR{media}=="tape", RUN+="modprobe.sh ide-scsi"
-
-# Load driver for scsi-device
-SUBSYSTEM!="scsi_device", GOTO="hotplug_scsi_end"
-
-	# Parts taken from redhat-rules
-	# sd:           0 TYPE_DISK, 7 TYPE_MOD, 14 TYPE_RBC
-	# sr:           4 TYPE_WORM, 5 TYPE_ROM
-	# st/osst:      1 TYPE_TAPE
-
-	ATTRS{type}=="?*",	TEST!="[module/sg]", RUN+="modprobe.sh sg"
-	ATTRS{type}=="0|7|14",	RUN+="modprobe.sh sd_mod"
-	ATTRS{type}=="4|5",	RUN+="modprobe.sh sr_mod"
-	ATTRS{type}=="8",	RUN+="modprobe.sh ch"
-
-	ATTRS{type}=="1", ATTRS{vendor}=="On[sS]tream", \
-		ATTRS{model}!="ADR*", RUN+="modprobe.sh osst", GOTO="hotplug_scsi_end"
-	ATTRS{type}=="1", RUN+="modprobe.sh st"
-LABEL="hotplug_scsi_end"
-
-LABEL="drivers_end"
-
-- 
1.5.2.4


0011-add-name-substitution.patch:

--- NEW FILE 0011-add-name-substitution.patch ---
>From 1113044be205f9d78642744ffaa01329a77bee79 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Wed, 29 Aug 2007 14:04:55 +0200
Subject: [PATCH] add $name substitution

---
 udev.7       |    7 ++++++-
 udev.xml     |   10 +++++++++-
 udev_rules.c |    6 ++++++
 udevd.c      |    2 +-
 4 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/udev.7 b/udev.7
index 5f0ebb9..0ea5549 100644
--- a/udev.7
+++ b/udev.7
@@ -331,7 +331,7 @@ and
 \fBATTRS\fR\.
 .RE
 .PP
-\fB$driver\fR, \fB%d\fR
+\fB$driver\fR
 .RS 4
 The driver name of the device matched while searching the devpath upwards for
 \fBSUBSYSTEMS\fR,
@@ -373,6 +373,11 @@ The string returned by the external program requested with PROGRAM\. A single pa
 The node name of the parent device\.
 .RE
 .PP
+\fB$name\fR
+.RS 4
+The name of the device node\. The value is only set if an earlier rule assigned a value, or during a remove events\.
+.RE
+.PP
 \fB$root\fR, \fB%r\fR
 .RS 4
 The udev_root value\.
diff --git a/udev.xml b/udev.xml
index b43abb7..9fb6152 100644
--- a/udev.xml
+++ b/udev.xml
@@ -488,7 +488,7 @@
             </varlistentry>
 
             <varlistentry>
-              <term><option>$driver</option>, <option>%d</option></term>
+              <term><option>$driver</option></term>
               <listitem>
                 <para>The driver name of the device matched while searching the devpath upwards for
                   <option>SUBSYSTEMS</option>, <option>KERNELS</option>, <option>DRIVERS</option> and <option>ATTRS</option>.
@@ -548,6 +548,14 @@
             </varlistentry>
 
             <varlistentry>
+              <term><option>$name</option></term>
+              <listitem>
+                <para>The name of the device node. The value is only set if an earlier
+                rule assigned a value, or during a remove events.</para>
+              </listitem>
+            </varlistentry>
+
+            <varlistentry>
               <term><option>$root</option>, <option>%r</option></term>
               <listitem>
                 <para>The udev_root value.</para>
diff --git a/udev_rules.c b/udev_rules.c
index 35db958..01fb211 100644
--- a/udev_rules.c
+++ b/udev_rules.c
@@ -606,6 +606,7 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize)
 		SUBST_ATTR,
 		SUBST_PARENT,
 		SUBST_TEMP_NODE,
+		SUBST_NAME,
 		SUBST_ROOT,
 		SUBST_SYS,
 		SUBST_ENV,
@@ -627,6 +628,7 @@ void udev_rules_apply_format(struct udevice *udev, char *string, size_t maxsize)
 		{ .name = "sysfs",	.fmt = 's',	.type = SUBST_ATTR },
 		{ .name = "parent",	.fmt = 'P',	.type = SUBST_PARENT },
 		{ .name = "tempnode",	.fmt = 'N',	.type = SUBST_TEMP_NODE },
+		{ .name = "name",	.fmt = 'D',	.type = SUBST_NAME },
 		{ .name = "root",	.fmt = 'r',	.type = SUBST_ROOT },
 		{ .name = "sys",	.fmt = 'S',	.type = SUBST_SYS },
 		{ .name = "env",	.fmt = 'E',	.type = SUBST_ENV },
@@ -845,6 +847,10 @@ found:
 			strlcat(string, udev->tmp_node, maxsize);
 			dbg("substitute temporary device node name '%s'", udev->tmp_node);
 			break;
+		case SUBST_NAME:
+			strlcat(string, udev->name, maxsize);
+			dbg("substitute udev->name '%s'", udev->name);
+			break;
 		case SUBST_ROOT:
 			strlcat(string, udev_root, maxsize);
 			dbg("substitute udev_root '%s'", udev_root);
diff --git a/udevd.c b/udevd.c
index 3c46617..5ff5d3f 100644
--- a/udevd.c
+++ b/udevd.c
@@ -508,7 +508,7 @@ static int devpath_busy(struct udevd_uevent_msg *msg, int limit)
 			}
 	}
 
-	/* check runing-queue for still running events */
+	/* check run queue for still running events */
 	list_for_each_entry(loop_msg, &running_list, node) {
 		if (limit && childs_count++ > limit) {
 			dbg("%llu, maximum number (%i) of childs reached", msg->seqnum, childs_count);
-- 
1.5.2.4


0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch:

--- NEW FILE 0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch ---
>From a75689bad504e35e346b84960b2b604532b1d6b5 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Wed, 29 Aug 2007 14:11:37 +0200
Subject: [PATCH] do not delete the device node with ignore_remove, but handle the event

---
 udev.7        |    2 +-
 udev.xml      |    4 ++--
 udev_device.c |    8 ++++----
 udev_rules.c  |   15 ++++++++++++---
 4 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/udev.7 b/udev.7
index 0ea5549..874c9ab 100644
--- a/udev.7
+++ b/udev.7
@@ -275,7 +275,7 @@ Ignore this event completely\.
 .PP
 \fBignore_remove\fR
 .RS 4
-Ignore any later remove event for this device\. This may be useful as a workaround for broken device drivers\.
+Do not remove the device node when the device goes away\. This may be useful as a workaround for broken device drivers\.
 .RE
 .PP
 \fBlink_priority=\fR\fB\fIvalue\fR\fR
diff --git a/udev.xml b/udev.xml
index 9fb6152..83a9d75 100644
--- a/udev.xml
+++ b/udev.xml
@@ -416,8 +416,8 @@
                   <varlistentry>
                     <term><option>ignore_remove</option></term>
                     <listitem>
-                      <para>Ignore any later remove event for this device. This may be useful
-                      as a workaround for broken device drivers.</para>
+                      <para>Do not remove the device node when the device goes away. This may be
+                      useful as a workaround for broken device drivers.</para>
                     </listitem>
                   </varlistentry>
                   <varlistentry>
diff --git a/udev_device.c b/udev_device.c
index 2b7ffe0..62217ff 100644
--- a/udev_device.c
+++ b/udev_device.c
@@ -266,10 +266,6 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev)
 		/* import database entry, and delete it */
 		if (udev_db_get_device(udev, udev->dev->devpath) == 0) {
 			udev_db_delete_device(udev);
-			if (udev->ignore_remove) {
-				info("ignore_remove for '%s'", udev->name);
-				goto exit;
-			}
 			/* restore stored persistent data */
 			list_for_each_entry(name_loop, &udev->env_list, node)
 				putenv(name_loop->name);
@@ -285,6 +281,10 @@ int udev_device_event(struct udev_rules *rules, struct udevice *udev)
 			goto exit;
 		}
 
+		if (udev->ignore_remove) {
+			info("ignore_remove for '%s'", udev->name);
+			goto exit;
+		}
 		/* remove the node */
 		retval = udev_node_remove(udev);
 
diff --git a/udev_rules.c b/udev_rules.c
index 01fb211..364d1b7 100644
--- a/udev_rules.c
+++ b/udev_rules.c
@@ -1472,9 +1472,14 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev)
 			break;
 
 		dbg("process rule");
-		if (rule->name.operation != KEY_OP_UNSET || rule->symlink.operation != KEY_OP_UNSET ||
-		    rule->mode_operation != KEY_OP_UNSET || rule->owner.operation != KEY_OP_UNSET ||
-		    rule->group.operation != KEY_OP_UNSET) {
+		if (rule->name.operation == KEY_OP_ASSIGN ||
+		    rule->name.operation == KEY_OP_ASSIGN_FINAL ||
+		    rule->name.operation == KEY_OP_ADD ||
+		    rule->symlink.operation == KEY_OP_ASSIGN ||
+		    rule->symlink.operation == KEY_OP_ASSIGN_FINAL ||
+		    rule->symlink.operation == KEY_OP_ADD ||
+		    rule->mode_operation != KEY_OP_UNSET ||
+		    rule->owner.operation != KEY_OP_UNSET || rule->group.operation != KEY_OP_UNSET) {
 			dbg("skip rule that names a device");
 			continue;
 		}
@@ -1485,6 +1490,10 @@ int udev_rules_get_run(struct udev_rules *rules, struct udevice *udev)
 				udev->ignore_device = 1;
 				return 0;
 			}
+			if (rule->ignore_remove) {
+				udev->ignore_remove = 1;
+				dbg("remove event should be ignored");
+			}
 
 			if (!udev->run_final && rule->run.operation != KEY_OP_UNSET) {
 				struct name_entry *entry;
-- 
1.5.2.4


0013-print-warning-for-invalid-TEST-operations.patch:

--- NEW FILE 0013-print-warning-for-invalid-TEST-operations.patch ---
>From a506e6298cffed4576f9cea8df15b2f8945fc731 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Wed, 29 Aug 2007 22:19:28 +0200
Subject: [PATCH] print warning for invalid TEST operations

---
 udev_rules.c       |    3 ++-
 udev_rules_parse.c |    5 +++++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/udev_rules.c b/udev_rules.c
index 364d1b7..ef352ca 100644
--- a/udev_rules.c
+++ b/udev_rules.c
@@ -994,7 +994,8 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule)
 		}
 	}
 
-	if (rule->test.operation != KEY_OP_UNSET) {
+	if (rule->test.operation == KEY_OP_MATCH ||
+	    rule->test.operation == KEY_OP_NOMATCH) {
 		char filename[PATH_SIZE];
 		char devpath[PATH_SIZE];
 		char *attr;
diff --git a/udev_rules_parse.c b/udev_rules_parse.c
index 3afc31a..9e43581 100644
--- a/udev_rules_parse.c
+++ b/udev_rules_parse.c
@@ -469,6 +469,11 @@ static int add_to_rules(struct udev_rules *rules, char *line, const char *filena
 		}
 
 		if (strncasecmp(key, "TEST", sizeof("TEST")-1) == 0) {
+			if (operation != KEY_OP_MATCH &&
+			    operation != KEY_OP_NOMATCH) {
+				err("invalid TEST operation");
+				goto invalid;
+			}
 			attr = get_key_attribute(key + sizeof("TEST")-1);
 			if (attr != NULL)
 				rule->test_mode_mask = strtol(attr, NULL, 8);
-- 
1.5.2.4


0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch:

--- NEW FILE 0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch ---
>From b5bc27029a82ff37c36f6e9d06f23c3005fe3382 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Thu, 30 Aug 2007 14:14:54 +0200
Subject: [PATCH] rules: do not delete /lib/udev/devices/ nodes on "remove"

---
 etc/udev/rules.d/50-udev-default.rules |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules
index f869f51..76f0976 100644
--- a/etc/udev/rules.d/50-udev-default.rules
+++ b/etc/udev/rules.d/50-udev-default.rules
@@ -101,3 +101,6 @@ KERNEL=="sxctl",		NAME="specialix_sxctl", SYMLINK+="%k"
 KERNEL=="rioctl",		NAME="specialix_rioctl", SYMLINK+="%k"
 KERNEL=="iowarrior[0-9]*",	NAME="usb/%k"
 
+# do not delete static device nodes
+ACTION=="remove", NAME=="?*", TEST=="/lib/udev/devices/$name", OPTIONS+="ignore_remove"
+
-- 
1.5.2.4


0015-rules-remove-broken-nvram-group-assignment-without.patch:

--- NEW FILE 0015-rules-remove-broken-nvram-group-assignment-without.patch ---
>From 9d1f93803f166149b3c467a465a126b2fb31e93c Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Thu, 30 Aug 2007 14:25:17 +0200
Subject: [PATCH] rules: remove broken nvram group assignment without any permission

---
 etc/udev/rules.d/50-udev-default.rules |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules
index 76f0976..633e2e7 100644
--- a/etc/udev/rules.d/50-udev-default.rules
+++ b/etc/udev/rules.d/50-udev-default.rules
@@ -20,7 +20,6 @@ KERNEL=="lirc0",		SYMLINK+="lirc"
 KERNEL=="null|zero|full|random|urandom", MODE="0666"
 KERNEL=="null",			SYMLINK+="XOR"
 KERNEL=="mem|kmem|port",	GROUP="kmem", MODE="0640"
-KERNEL=="nvram",		GROUP="kmem", MODE="0600"
 KERNEL=="ram0",			SYMLINK+="ramdisk"
 KERNEL=="ram1",			SYMLINK+="ram"
 
-- 
1.5.2.4


0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch:

--- NEW FILE 0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch ---
>From 89e0a02226cbadf6a58c4d234e31c7111eed20bc Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Thu, 30 Aug 2007 15:03:21 +0200
Subject: [PATCH] add /dev/rtc symlink if new rtc drivers are used

---
 etc/udev/rules.d/50-udev-default.rules |    3 ++-
 udev_node.c                            |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules
index 633e2e7..854809a 100644
--- a/etc/udev/rules.d/50-udev-default.rules
+++ b/etc/udev/rules.d/50-udev-default.rules
@@ -88,7 +88,8 @@ KERNEL=="microcode",		NAME="cpu/microcode", MODE="0600"
 
 # miscellaneous
 KERNEL=="fuse",			MODE="0666"
-KERNEL=="rtc",			MODE="0644"
+KERNEL=="rtc|rtc0",		MODE="0644"
+KERNEL=="rtc0",			SYMLINK+="rtc"
 KERNEL=="auer[0-9]*"		NAME="usb/%k"
 KERNEL=="hw_random",		NAME="hwrng", SYMLINK+="%k"
 KERNEL=="mmtimer",		MODE="0644"
diff --git a/udev_node.c b/udev_node.c
index fcd52d0..25eed86 100644
--- a/udev_node.c
+++ b/udev_node.c
@@ -133,7 +133,7 @@ static int node_symlink(const char *node, const char *slink)
 				    stats.st_rdev == stats2.st_rdev) {
 					info("replace device node '%s' with symlink to our node '%s'", slink, node);
 				} else {
-					err("device node '%s' already exists, link '%s' will not overwrite it", node, slink);
+					err("device node '%s' already exists, link to '%s' will not overwrite it", slink, node);
 					goto exit;
 				}
 			}
-- 
1.5.2.4


0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch:

--- NEW FILE 0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch ---
>From 39ea7c6c67de69379b603196a0eff6f7ce2e469a Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Fri, 31 Aug 2007 11:01:35 +0200
Subject: [PATCH] increase WAIT_FOR_SYSFS timeout to 10 seconds

We see SCSI disks where it takes 6.5 seconds to populate the
sysfs attributes.
---
 udev_rules.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/udev_rules.c b/udev_rules.c
index ef352ca..dcd0914 100644
--- a/udev_rules.c
+++ b/udev_rules.c
@@ -1040,7 +1040,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule)
 	if (rule->wait_for_sysfs.operation != KEY_OP_UNSET) {
 		int found;
 
-		found = (wait_for_sysfs(udev, key_val(rule, &rule->wait_for_sysfs), 3) == 0);
+		found = (wait_for_sysfs(udev, key_val(rule, &rule->wait_for_sysfs), 10) == 0);
 		if (!found && (rule->wait_for_sysfs.operation != KEY_OP_NOMATCH))
 			goto nomatch;
 	}
-- 
1.5.2.4


0018-correct-includes-in-udev_selinux.c.patch:

--- NEW FILE 0018-correct-includes-in-udev_selinux.c.patch ---
>From 07acdb0f7413eeb261bdb52eba6abe75371cc202 Mon Sep 17 00:00:00 2001
From: maximilian attems <max at stro.at>
Date: Thu, 6 Sep 2007 13:12:48 +0200
Subject: [PATCH] correct includes in udev_selinux.c

---
 udev_selinux.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/udev_selinux.c b/udev_selinux.c
index 1ad6e8a..3fa84a0 100644
--- a/udev_selinux.c
+++ b/udev_selinux.c
@@ -24,8 +24,8 @@
 #include <fcntl.h>
 #include <ctype.h>
 #include <limits.h>
-#include <libgen.h>
 #include <errno.h>
+#include <sys/stat.h>
 #include <selinux/selinux.h>
 
 #include "udev.h"
-- 
1.5.2.4


0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch:

--- NEW FILE 0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch ---
>From 8aab4ce40b821d7b759b98bb97afcd3e0b7c80d8 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Fri, 7 Sep 2007 04:01:21 +0200
Subject: [PATCH] rules: put bsd nodes in /dev/bsd/ directory

---
 etc/udev/rules.d/50-udev-default.rules |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/etc/udev/rules.d/50-udev-default.rules b/etc/udev/rules.d/50-udev-default.rules
index 854809a..bdce004 100644
--- a/etc/udev/rules.d/50-udev-default.rules
+++ b/etc/udev/rules.d/50-udev-default.rules
@@ -77,6 +77,7 @@ SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk"
 KERNEL=="pktcdvd[0-9]*",	NAME="pktcdvd/%k"
 KERNEL=="pktcdvd",		NAME="pktcdvd/control"
 KERNEL=="qft0",			SYMLINK+="ftape"
+SUBSYSTEM=="bsg"		NAME="bsg/%k"
 
 # network
 KERNEL=="tun",			NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove"
-- 
1.5.2.4


0020-path_id-fix-for-stacked-class-devices.patch:

--- NEW FILE 0020-path_id-fix-for-stacked-class-devices.patch ---
>From b1ac36ff5e3756cefc79967a26280056da31bf6f Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Mon, 10 Sep 2007 00:59:07 +0200
Subject: [PATCH] path_id: fix for stacked class devices

---
 extras/path_id/path_id |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/extras/path_id/path_id b/extras/path_id/path_id
index 57879b5..a3a627e 100755
--- a/extras/path_id/path_id
+++ b/extras/path_id/path_id
@@ -456,7 +456,11 @@ handle_device () {
 					return
 				fi
 			fi
-			cd $full_sysfs_path/device
+			if [ -L $full_sysfs_path/device/device ]; then
+				cd $full_sysfs_path/device/device
+			else
+				cd $full_sysfs_path/device
+			fi
 			;;
 	esac
 	full_sysfs_device_path="`pwd -P`"
-- 
1.5.2.4


0021-check-line-length-after-comment-check-and-whitespace.patch:

--- NEW FILE 0021-check-line-length-after-comment-check-and-whitespace.patch ---
>From 16511863d928e7fd82f15ae64850ab21e74f0f16 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald at redhat.com>
Date: Tue, 11 Sep 2007 17:17:29 +0200
Subject: [PATCH] check line length after comment check and whitespace strip

---
 udev_config.c |   10 +++++-----
 udev_rules.c  |   10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/udev_config.c b/udev_config.c
index 3f226b9..2f2a69e 100644
--- a/udev_config.c
+++ b/udev_config.c
@@ -111,11 +111,6 @@ static int parse_config_file(void)
 		cur += count+1;
 		lineno++;
 
-		if (count >= sizeof(line)) {
-			err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno);
-			continue;
-		}
-
 		/* eat the whitespace */
 		while ((count > 0) && isspace(bufline[0])) {
 			bufline++;
@@ -128,6 +123,11 @@ static int parse_config_file(void)
 		if (bufline[0] == COMMENT_CHARACTER)
 			continue;
 
+		if (count >= sizeof(line)) {
+			err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno);
+			continue;
+		}
+
 		memcpy(line, bufline, count);
 		line[count] = '\0';
 
diff --git a/udev_rules.c b/udev_rules.c
index dcd0914..3ec8477 100644
--- a/udev_rules.c
+++ b/udev_rules.c
@@ -349,11 +349,6 @@ static int import_keys_into_env(struct udevice *udev, const char *buf, size_t bu
 		cur += count+1;
 		lineno++;
 
-		if (count >= sizeof(line)) {
-			err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno);
-			continue;
-		}
-
 		/* eat the whitespace */
 		while ((count > 0) && isspace(bufline[0])) {
 			bufline++;
@@ -366,6 +361,11 @@ static int import_keys_into_env(struct udevice *udev, const char *buf, size_t bu
 		if (bufline[0] == COMMENT_CHARACTER)
 			continue;
 
+		if (count >= sizeof(line)) {
+			err("line too long, conf line skipped %s, line %d", udev_config_filename, lineno);
+			continue;
+		}
+
 		memcpy(line, bufline, count);
 		line[count] = '\0';
 
-- 
1.5.2.4


0022-only-install-.rules.patch:

--- NEW FILE 0022-only-install-.rules.patch ---
>From 554074c9ca2f1b8876176887e4656d06b870f2cd Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald at redhat.com>
Date: Tue, 11 Sep 2007 17:20:54 +0200
Subject: [PATCH] only install *.rules

---
 Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 39ffc7d..92ca846 100644
--- a/Makefile
+++ b/Makefile
@@ -230,9 +230,9 @@ install-config:
 	@ if [ ! -r $(DESTDIR)$(configdir)/udev.conf ]; then \
 		$(INSTALL_DATA) etc/udev/udev.conf $(DESTDIR)$(configdir); \
 	fi
-	@ for i in $(shell ls -1 etc/udev/rules.d); do \
-		if [ ! -r $(DESTDIR)$(configdir)/rules.d/$$i ]; then \
-			$(INSTALL_DATA) etc/udev/rules.d/$$i $(DESTDIR)$(configdir)/rules.d; \
+	@ for i in etc/udev/rules.d/*.rules; do \
+		if [ ! -r $(DESTDIR)$(configdir)/rules.d/$$(basename $$i) ]; then \
+			$(INSTALL_DATA) $$i $(DESTDIR)$(configdir)/rules.d; \
 		fi \
 	done
 	@ extras="$(EXTRAS)"; for target in $$extras; do \
-- 
1.5.2.4


0023-ignore-device-node-names-while-restoring-symlinks-fr.patch:

--- NEW FILE 0023-ignore-device-node-names-while-restoring-symlinks-fr.patch ---
>From 25c208d659cf0f8bc887a1f7c62e9d2e0c546aec Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Wed, 12 Sep 2007 00:21:53 +0200
Subject: [PATCH] ignore device node names while restoring symlinks from the stack

---
 udev_node.c |   18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/udev_node.c b/udev_node.c
index 25eed86..556a442 100644
--- a/udev_node.c
+++ b/udev_node.c
@@ -230,11 +230,15 @@ static int update_link(struct udevice *udev, const char *name)
 		if (udev_db == NULL)
 			continue;
 		if (udev_db_get_device(udev_db, device->name) == 0) {
-			info("compare priority of '%s' %i > %i",
-			     udev_db->dev->devpath, udev_db->link_priority, priority);
-			if (target[0] == '\0' || udev_db->link_priority > priority) {
-				priority = udev_db->link_priority;
-				strlcpy(target, udev_db->name, sizeof(target));
+			if (strcmp(udev_db->name, name) == 0) {
+				info("'%s' is a device node of '%s', skip link update", udev_db->name, device->name);
+			} else {
+				info("compare priority of '%s' %i > %i",
+				     udev_db->dev->devpath, udev_db->link_priority, priority);
+				if (target[0] == '\0' || udev_db->link_priority > priority) {
+					priority = udev_db->link_priority;
+					strlcpy(target, udev_db->name, sizeof(target));
+				}
 			}
 		}
 		udev_device_cleanup(udev_db);
@@ -242,8 +246,8 @@ static int update_link(struct udevice *udev, const char *name)
 	name_list_cleanup(&name_list);
 
 	if (target[0] == '\0') {
-		err("missing target for '%s'", name);
-		rc = -1;
+		info("no current target for '%s' found", name);
+		rc = 1;
 		goto out;
 	}
 
-- 
1.5.2.4


0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch:

--- NEW FILE 0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch ---
>From ce39874580829dc97f77b78114874b5086056e5c Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Thu, 20 Sep 2007 00:41:54 +0200
Subject: [PATCH] use SEQNUM in /dev/.udev/queue/ instead of devpath

---
 udevd.c |   45 ++++++++++++++-------------------------------
 1 files changed, 14 insertions(+), 31 deletions(-)

diff --git a/udevd.c b/udevd.c
index 5ff5d3f..eb311df 100644
--- a/udevd.c
+++ b/udevd.c
@@ -154,22 +154,16 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st
 	char filename[PATH_SIZE];
 	char filename_failed[PATH_SIZE];
 	size_t start;
-	struct udevd_uevent_msg *loop_msg;
-	int fd;
 
 	/* location of queue file */
-	strlcpy(filename, udev_root, sizeof(filename));
-	strlcat(filename, "/", sizeof(filename));
-	start = strlcat(filename, EVENT_QUEUE_DIR"/", sizeof(filename));
-	strlcat(filename, msg->devpath, sizeof(filename));
-	path_encode(&filename[start], sizeof(filename) - start);
+	snprintf(filename, sizeof(filename), "%s/"EVENT_QUEUE_DIR"/%llu", udev_root, msg->seqnum);
 
 	/* location of failed file */
 	strlcpy(filename_failed, udev_root, sizeof(filename_failed));
 	strlcat(filename_failed, "/", sizeof(filename_failed));
 	start = strlcat(filename_failed, EVENT_FAILED_DIR"/", sizeof(filename_failed));
 	strlcat(filename_failed, msg->devpath, sizeof(filename_failed));
-	path_encode(&filename_failed[start], sizeof(filename) - start);
+	path_encode(&filename_failed[start], sizeof(filename_failed) - start);
 
 	switch (state) {
 	case EVENT_QUEUED:
@@ -177,12 +171,9 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st
 		delete_path(filename_failed);
 
 		create_path(filename);
-		fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0644);
-		if (fd > 0)
-			close(fd);
-		return;
+		symlink(msg->devpath, filename);
+		break;
 	case EVENT_FINISHED:
-	case EVENT_FAILED:
 		if (msg->devpath_old != NULL) {
 			/* "move" event - rename failed file to current name, do not delete failed */
 			char filename_failed_old[PATH_SIZE];
@@ -201,28 +192,20 @@ static void export_event_state(struct udevd_uevent_msg *msg, enum event_state st
 			delete_path(filename_failed);
 		}
 
-		/* skip if events for the same path are still pending */
-		list_for_each_entry(loop_msg, &running_list, node)
-			if (loop_msg->devpath && strcmp(loop_msg->devpath, msg->devpath) == 0)
-				return;
-
-		list_for_each_entry(loop_msg, &exec_list, node)
-			if (loop_msg->devpath && strcmp(loop_msg->devpath, msg->devpath) == 0)
-				return;
-
+		unlink(filename);
+		delete_path(filename);
+		break;
+	case EVENT_FAILED:
 		/* move failed event to the failed directory */
-		if (state == EVENT_FAILED) {
-			create_path(filename_failed);
-			rename(filename, filename_failed);
-		} else {
-			unlink(filename);
-		}
+		create_path(filename_failed);
+		rename(filename, filename_failed);
 
 		/* clean up possibly empty queue directory */
 		delete_path(filename);
-
-		return;
+		break;
 	}
+
+	return;
 }
 
 static void msg_queue_delete(struct udevd_uevent_msg *msg)
@@ -297,7 +280,7 @@ static void msg_queue_insert(struct udevd_uevent_msg *msg)
 	}
 
 	export_event_state(msg, EVENT_QUEUED);
-	info("seq %llu forked, '%s' '%s'", msg->seqnum, msg->action, msg->subsystem);
+	info("seq %llu queued, '%s' '%s'", msg->seqnum, msg->action, msg->subsystem);
 
 	/* run one event after the other in debug mode */
 	if (debug_trace) {
-- 
1.5.2.4


0025-rules-add-memstick-module-loading.patch:

--- NEW FILE 0025-rules-add-memstick-module-loading.patch ---
>From 3a58ef80dfbc08fd8722af5408a26abe12fe053c Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Thu, 20 Sep 2007 00:46:44 +0200
Subject: [PATCH] rules: add memstick module loading

---
 etc/udev/rules.d/80-drivers.rules |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/etc/udev/rules.d/80-drivers.rules b/etc/udev/rules.d/80-drivers.rules
index 3388266..5340565 100644
--- a/etc/udev/rules.d/80-drivers.rules
+++ b/etc/udev/rules.d/80-drivers.rules
@@ -6,6 +6,7 @@ DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{ignore_error}+="/sbin/modprobe $env{MODAL
 SUBSYSTEM=="pnp", DRIVER!="?*", ENV{MODALIAS}!="?*", \
   RUN{ignore_error}+="/bin/sh -c '/sbin/modprobe -a $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'"
 SUBSYSTEM=="tifm", RUN+="/sbin/modprobe --all tifm_sd tifm_ms"
+SUBSYSTEM=="memstick", RUN+="/sbin/modprobe --all ms_block mspro_block"
 SUBSYSTEM=="mmc", RUN+="/sbin/modprobe mmc_block"
 SUBSYSTEM=="i2o", RUN+="/sbin/modprobe i2o_block"
 SUBSYSTEM=="ide", ATTR{media}=="tape", RUN+="/sbin/modprobe ide-scsi"
-- 
1.5.2.4


0026-remove-extra-space-from-udevinfo-symlink-output.patch:

--- NEW FILE 0026-remove-extra-space-from-udevinfo-symlink-output.patch ---
>From c952356635a30f610a4d1b84e84d678fee7772c8 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald at redhat.com>
Date: Thu, 20 Sep 2007 15:24:42 +0200
Subject: [PATCH] remove extra space from udevinfo symlink output

---
 udevinfo.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/udevinfo.c b/udevinfo.c
index be9aa76..8e54705 100644
--- a/udevinfo.c
+++ b/udevinfo.c
@@ -389,10 +389,16 @@ int main(int argc, char *argv[], char *envp[])
 				goto exit;
 			if (root)
 				list_for_each_entry(name_loop, &udev->symlink_list, node)
-					printf("%s/%s ", udev_root, name_loop->name);
+					if (name_loop->node.next != &udev->symlink_list)
+						printf("%s/%s ", udev_root, name_loop->name);
+					else
+						printf("%s/%s", udev_root, name_loop->name);
 			else
 				list_for_each_entry(name_loop, &udev->symlink_list, node)
-					printf("%s ", name_loop->name);
+					if (name_loop->node.next != &udev->symlink_list)
+						printf("%s ", name_loop->name);
+					else
+						printf("%s", name_loop->name);
 			printf("\n");
 			break;
 		case QUERY_PATH:
-- 
1.5.2.4


0027-udevinfo-simplify-symlink-printing-logic.patch:

--- NEW FILE 0027-udevinfo-simplify-symlink-printing-logic.patch ---
>From 18770246edda383eef523a7e3aedd08ebbbde5cf Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Thu, 20 Sep 2007 15:25:29 +0200
Subject: [PATCH] udevinfo: simplify symlink printing logic

---
 udevinfo.c |   23 ++++++++---------------
 1 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/udevinfo.c b/udevinfo.c
index 8e54705..eb9b353 100644
--- a/udevinfo.c
+++ b/udevinfo.c
@@ -385,21 +385,14 @@ int main(int argc, char *argv[], char *envp[])
 				printf("%s\n", udev->name);
 			break;
 		case QUERY_SYMLINK:
-			if (list_empty(&udev->symlink_list))
-				goto exit;
-			if (root)
-				list_for_each_entry(name_loop, &udev->symlink_list, node)
-					if (name_loop->node.next != &udev->symlink_list)
-						printf("%s/%s ", udev_root, name_loop->name);
-					else
-						printf("%s/%s", udev_root, name_loop->name);
-			else
-				list_for_each_entry(name_loop, &udev->symlink_list, node)
-					if (name_loop->node.next != &udev->symlink_list)
-						printf("%s ", name_loop->name);
-					else
-						printf("%s", name_loop->name);
-			printf("\n");
+			list_for_each_entry(name_loop, &udev->symlink_list, node) {
+				char c = name_loop->node.next != &udev->symlink_list ? ' ' : '\n';
+
+				if (root)
+					printf("%s/%s%c", udev_root, name_loop->name, c);
+				else
+					printf("%s%c", name_loop->name, c);
+			}
 			break;
 		case QUERY_PATH:
 			printf("%s\n", udev->dev->devpath);
-- 
1.5.2.4


0028-prevent-wrong-symlink-creation-if-database-disagress.patch:

--- NEW FILE 0028-prevent-wrong-symlink-creation-if-database-disagress.patch ---
>From b2d1ae727e78ac3e22caa11798360d87775095ff Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Thu, 20 Sep 2007 19:38:58 +0200
Subject: [PATCH] prevent wrong symlink creation if database disagress with current rules

---
 udev_node.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/udev_node.c b/udev_node.c
index 556a442..c620e4a 100644
--- a/udev_node.c
+++ b/udev_node.c
@@ -218,14 +218,16 @@ static int update_link(struct udevice *udev, const char *name)
 		if (strcmp(udev->dev->devpath, device->name) == 0) {
 			info("compare (our own) priority of '%s' %i >= %i",
 			     udev->dev->devpath, udev->link_priority, priority);
-			if (target[0] == '\0' || udev->link_priority >= priority) {
+			if (strcmp(udev->name, name) == 0) {
+				info("'%s' is our device node, database inconsistent, skip link update", udev->name);
+			} else if (target[0] == '\0' || udev->link_priority >= priority) {
 				priority = udev->link_priority;
 				strlcpy(target, udev->name, sizeof(target));
 			}
 			continue;
 		}
 
-		/* or something else, then read priority from database */
+		/* another device, read priority from database */
 		udev_db = udev_device_init(NULL);
 		if (udev_db == NULL)
 			continue;
-- 
1.5.2.4


0029-fix-wrong-variable-used-in-logged-string.patch:

--- NEW FILE 0029-fix-wrong-variable-used-in-logged-string.patch ---
>From 3a3d078cfd3a3adb1c9f66e0df95d704c3a92504 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Fri, 21 Sep 2007 00:55:19 +0200
Subject: [PATCH] fix wrong variable used in logged string

---
 udev_rules.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/udev_rules.c b/udev_rules.c
index 3ec8477..5ae4aa2 100644
--- a/udev_rules.c
+++ b/udev_rules.c
@@ -1446,7 +1446,7 @@ int udev_rules_get_name(struct udev_rules *rules, struct udevice *udev)
 	}
 
 	if (!name_set) {
-		info("no node name set, will use kernel name '%s'", udev->name);
+		info("no node name set, will use kernel name '%s'", udev->dev->kernel);
 		strlcpy(udev->name, udev->dev->kernel, sizeof(udev->name));
 	}
 
-- 
1.5.2.4


0030-update-README.patch:

--- NEW FILE 0030-update-README.patch ---
>From b317b96c15bc61d59f138515e71f05bbd8f7b2ff Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Fri, 21 Sep 2007 10:33:36 +0200
Subject: [PATCH] update README

---
 README |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/README b/README
index 74aa790..b37d0d5 100644
--- a/README
+++ b/README
@@ -3,13 +3,10 @@ udev - userspace device management
 For more information see the files in the docs/ directory.
 
 Important Note:
-  Integrating udev in the system is a whole lot of work, has complex dependencies
-  and differs a lot from distro to distro. All major distros depend on udev these
-  days and the system may not work without a proper installed version. The upstream
-  udev project does not support or recommend to replace a distro's udev installation
-  with the upstream version. The installation of a unmodified upstream version may
-  render your system unusable. Until now, there is no "default" setup or a set of
-  "default" rules provided by the upstream udev version.
+  Integrating udev in the system has complex dependencies and differs from distro
+  to distro. All major distros depend on udev these days and the system may not
+  work without a properly installed version. The upstream udev project does not
+  recommend to replace a distro's udev installation with the upstream version.
 
 Requirements:
   - Version 2.6.15 of the Linux kernel for reliable operation of this release of
@@ -21,7 +18,7 @@ Requirements:
     but it is completely silly - don't complain if anything goes wrong.)
 
   - The proc filesystem must be mounted on /proc, the sysfs filesystem must
-    be mounted at /sys. No other location will be supported by udev.
+    be mounted at /sys. No other location is supported by udev.
 
 
 Operation:
-- 
1.5.2.4


0031-rule_generator-move-all-policy-from-write_net_rules.patch:

--- NEW FILE 0031-rule_generator-move-all-policy-from-write_net_rules.patch ---
>From c746922ca26fe18f6b3f3a4516e7236bfc0106b7 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Fri, 21 Sep 2007 17:42:46 +0200
Subject: [PATCH] rule_generator: move all policy from write_net_rules to the rules file

---
 .../75-persistent-net-generator.rules              |   43 ++++++--
 extras/rule_generator/write_net_rules              |  119 +++++++++-----------
 2 files changed, 84 insertions(+), 78 deletions(-)

diff --git a/extras/rule_generator/75-persistent-net-generator.rules b/extras/rule_generator/75-persistent-net-generator.rules
index f88627d..d09bc38 100644
--- a/extras/rule_generator/75-persistent-net-generator.rules
+++ b/extras/rule_generator/75-persistent-net-generator.rules
@@ -1,33 +1,56 @@
 # do not edit this file, it will be overwritten on update
 
 # these rules generate rules for persistent network device naming
+#
+# variables used to communicate:
+#   MATCHADDR             MAC address used for the match
+#   MATCHID               bus_id used for the match
+#   MATCHDRV              driver name used for the match
+#   MATCHIFTYPE           interface type match
+#   COMMENT               comment to add to the generated rule
+#   INTERFACE_NAME        requested name supplied by external tool
+#   INTERFACE_NEW         new interface name returned by rule writer
 
 ACTION!="add", GOTO="persistent_net_generator_end"
 SUBSYSTEM!="net", GOTO="persistent_net_generator_end"
 
-# device name whitelist
-KERNEL!="eth*|ath*|wlan*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end"
-
 # ignore the interface if a name has already been set
 NAME=="?*", GOTO="persistent_net_generator_end"
 
+# device name whitelist
+KERNEL!="eth*|ath*|wlan*[0-9]|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end"
+
+# add interface type match for some devices
+KERNEL=="wlan*|ath*", ENV{MATCHIFTYPE}="1"
+
 # ignore Xen virtual interfaces
 SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end"
 
-# build device description string to add a comment to the generated rule
+# read MAC address
+ENV{MATCHADDR}="$attr{address}"
+
+# do not use "locally administered" MAC address
+ENV{MATCHADDR}=="?[2367abef]:*", ENV{MATCHADDR}=""
+
+# do not use empty address
+ENV{MATCHADDR}=="00:00:00:00:00:00", ENV{MATCHADDR}=""
+
+# build comment line for generated rule:
 SUBSYSTEMS=="pci", ENV{COMMENT}="PCI device $attr{vendor}:$attr{device} ($driver)"
 SUBSYSTEMS=="usb", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($driver)"
 SUBSYSTEMS=="pcmcia", ENV{COMMENT}="PCMCIA device $attr{card_id}:$attr{manf_id} ($driver)"
-SUBSYSTEMS=="ccwgroup", ENV{COMMENT}="S/390 $driver device at $id", ENV{NETDEV}="$id", ENV{NETDRV}="$driver"
 SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})"
-ENV{COMMENT}=="", ENV{COMMENT}="$env{SUBSYSTEM} device ($driver)"
 
-DRIVERS=="?*", ENV{NETDEV}=="?*", IMPORT{program}="write_net_rules --driver $env{NETDRV} --id $env{NETDEV}"
+# S/390 uses id matches only, do not use MAC address match
+SUBSYSTEMS=="ccwgroup", ENV{COMMENT}="S/390 $driver device at $id", ENV{MATCHID}="$id", ENV{MATCHDRV}="$driver", ENV{MATCHADDR}=""
+
+# default comment
+ENV{COMMENT}=="", ENV{COMMENT}="$env{SUBSYSTEM} device"
 
-# skip "locally administered" MAC addresses
-ATTR{address}=="?[2367abef]:*", GOTO="persistent_net_generator_end"
+# write rule
+DRIVERS=="?*", IMPORT{program}="write_net_rules"
 
-DRIVERS=="?*", ENV{NETDEV}!="?*", IMPORT{program}="write_net_rules $attr{address}"
+# rename interface if needed
 ENV{INTERFACE_NEW}=="?*", NAME="$env{INTERFACE_NEW}"
 
 LABEL="persistent_net_generator_end"
diff --git a/extras/rule_generator/write_net_rules b/extras/rule_generator/write_net_rules
index 62acb88..b25ecfd 100644
--- a/extras/rule_generator/write_net_rules
+++ b/extras/rule_generator/write_net_rules
@@ -1,20 +1,25 @@
 #!/bin/sh -e
 #
-# This script is run if the interface (recognized by its MAC address) lacks
-# a rule for persistent naming.
-#
-# If there is already a persistent rule with that interface name then the
-# current interface needs to be renamed.
-#
-# If the interface needs to be renamed, a NAME=value pair will be printed
-# on stdout to allow udev to IMPORT it. Then a rule for the MAC address and
-# interface name is written.
-#
-# (C) 2006 Marco d'Itri <md at Linux.IT>
+# Copyright (C) 2006 Marco d'Itri <md at Linux.IT>
+# Copyright (C) 2007 Kay Sievers <kay.sievers at vrfy.org>
 #
 # 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
 # Free Software Foundation version 2 of the License.
+#
+# This script is run to create persistent network device naming rules
+# based on properties of the device.
+# If the interface needs to be renamed, INTERFACE_NEW=<name> will be printed
+# on stdout to allow udev to IMPORT it.
+
+# variables used to communicate:
+#   MATCHADDR             MAC address used for the match
+#   MATCHID               bus_id used for the match
+#   MATCHDRV              driver name used for the match
+#   MATCHIFTYPE           interface type match
+#   COMMENT               comment to add to the generated rule
+#   INTERFACE_NAME        requested name supplied by external tool
+#   INTERFACE_NEW         new interface name returned by rule writer
 
 RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules'
 
@@ -49,78 +54,57 @@ write_rule() {
 
 	echo ""
 	[ "$comment" ] && echo "# $comment"
-	echo "SUBSYSTEM==\"net\", $match, NAME=\"$name\""
+	echo "SUBSYSTEM==\"net\", ACTION==\"add\"$match, NAME=\"$name\""
 	} >> $RULES_FILE
 }
 
 if [ -z "$INTERFACE" ]; then
-	echo "Missing \$INTERFACE." >&2
+	echo "missing \$INTERFACE" >&2
 	exit 1
 fi
 
-if [ "$1" ]; then
-    while [ "$*" ] ; do
-	case $1 in
-	    --mac)
-		shift
-		MAC_ADDR=$1
-		shift
-		;;
-	    --driver)
-		shift
-		DRIVER=$1
-		shift
-		;;
-	    --id)
-		shift
-		ID=$1
-		shift
-		;;
-	    *)
-		MAC_ADDR=$1
-		shift
-		;;
-	esac
-    done
-else
-    MAC_ADDR=$(sysread address)
-fi
-
-if [ -z "$DRIVER" ] && [ -z "$ID" ] ; then
-    if [ -z "$MAC_ADDR" ]; then
-	echo "No MAC address for $INTERFACE." >&2
-	exit 1
-    fi
-    if [ "$MAC_ADDR" = "00:00:00:00:00:00" ]; then
-	echo "NULL MAC address for $INTERFACE." >&2
-	exit 1
-    fi
-fi
-
 # Prevent concurrent processes from modifying the file at the same time.
 lock_rules_file
 
 # Check if the rules file is writeable.
 choose_rules_file
 
-# If a rule using the current name already exists then find a new name and
-# report it to udev which will rename the interface.
-basename=${INTERFACE%%[0-9]*}
-if interface_name_taken; then
-	INTERFACE="$basename$(find_next_available "$basename[0-9]*")"
-	if [ ! -t 1 ]; then
-		echo "INTERFACE_NEW=$INTERFACE"
-	fi
+# the DRIVERS key is needed to not match bridges and VLAN sub-interfaces
+if [ "$MATCHADDR" ]; then
+	match="$match, DRIVERS==\"?*\", ATTR{address}==\"$MATCHADDR\""
 fi
 
-# the DRIVERS key is needed to not match bridges and VLAN sub-interfaces
-if [ "$MAC_ADDR" ] ; then
-    match="DRIVERS==\"?*\", ATTR{address}==\"$MAC_ADDR\""
-else
-    match="DRIVERS==\"$DRIVER\", KERNELS==\"$ID\""
+if [ "$MATCHDRV" ]; then
+	match="$match, DRIVERS==\"$MATCHDRV\""
+fi
+
+if [ "$MATCHID" ]; then
+	match="$match, KERNELS==\"$MATCHID\""
+fi
+
+if [ "$MATCHIFTYPE" ]; then
+	match="$match, ATTR{type}==\"$MATCHIFTYPE\""
 fi
-if [ $basename = "ath" -o $basename = "wlan" ]; then
-	match="$match, ATTR{type}==\"1\"" # do not match the wifi* interfaces
+
+if [ -z "$match" ]; then
+	echo "missing valid match" >&2
+	exit 1
+fi
+
+if [ "$INTERFACE_NAME" ]; then
+	# external tools may request a custom name
+	COMMENT="$COMMENT (custom name provided by external tool)"
+	if [ "$INTERFACE_NAME" != "$INTERFACE" ]; then
+		INTERFACE=$INTERFACE_NAME;
+		echo "INTERFACE_NEW=$INTERFACE"
+	fi
+else
+	# if a rule using the current name already exists, find a new name
+	basename=${INTERFACE%%[0-9]*}
+	if interface_name_taken; then
+		INTERFACE="$basename$(find_next_available "$basename[0-9]*")"
+		echo "INTERFACE_NEW=$INTERFACE"
+	fi
 fi
 
 write_rule "$match" "$INTERFACE" "$COMMENT"
@@ -128,4 +112,3 @@ write_rule "$match" "$INTERFACE" "$COMMENT"
 unlock_rules_file
 
 exit 0
-
-- 
1.5.2.4



--- NEW FILE udev-post.init ---
#!/bin/bash
#
# udev-post     Post script for udev, after all filesystems are mounted
#
# Authors:      Harald Hoyer <harald at redhat.com>
#
# chkconfig: 345 26 75
# description: Moves the generated persistent udev rules to /etc/udev/rules.d
# 
### BEGIN INIT INFO
# Requires: $local_fs
### END INIT INFO

. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
  start)
	STRING=$"Adding udev persistent rules"
	
	# copy the rules generated before / was mounted read-write
	for file in /dev/.udev/tmp-rules--*; do
		dest=${file##*tmp-rules--}
		# check, if anything is todo
		[ "$dest" = '*' ] && exit 0
		echo -n $STRING 
		cat $file >> /etc/udev/rules.d/$dest
		rc=$?
		rm -f $file
		if [ "$rc" -eq "0" ]; then
			success "$STRING"
			echo
		elif [ "$rc" -eq "1" ]; then
			failure "$STRING"
			echo
            	fi
	done
	exit 0
	;;
  stop)
	exit 0
	;;
  *)
        echo $"Usage: $0 {start}"
        exit 1
esac
exit 0


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/udev/F-7/sources,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- sources	27 Jul 2007 17:57:52 -0000	1.43
+++ sources	1 Oct 2007 11:10:28 -0000	1.44
@@ -1 +1 @@
-cb9a227206b9d85ae8cfc88fc51c1710  udev-113.tar.bz2
+39bbe5ddcd62d35cd56b184d6862c540  udev-115.tar.bz2


Index: udev.spec
===================================================================
RCS file: /cvs/pkgs/rpms/udev/F-7/udev.spec,v
retrieving revision 1.210
retrieving revision 1.211
diff -u -r1.210 -r1.211
--- udev.spec	24 Aug 2007 10:41:53 -0000	1.210
+++ udev.spec	1 Oct 2007 11:10:28 -0000	1.211
@@ -5,9 +5,9 @@
 
 Summary: A userspace implementation of devfs
 Name: udev
-Version: 113
-Release: 12%{?dist}
-License: GPL
+Version: 115
+Release: 4.20070921git%{?dist}
+License: GPLv2
 Group: System Environment/Base
 Provides: udev-persistent = %{version}-%{release}
 Obsoletes: udev-persistent < 0:030-5
@@ -15,15 +15,43 @@
 
 Source1: start_udev
 Source2: udev.nodes
+Source3: udev-post.init
 Source4: fw_unit_symlinks.sh
-Source10: firmware_helper.c
 
-Patch1: udev-permconv.patch
-Patch2: udev-rules.patch
-Patch5: udev-extras.patch
-Patch7: udev-089-nopie.patch
-Patch9: udev-091-lib64.patch
-Patch14: udev-095-dbgwait.patch
+Patch1: 0001-set-buffer-size-if-strlcpy-strlcat-indicate-truncati.patch
+Patch2: 0002-rules-fix-two-trivial-typos.patch
+Patch3: 0003-rules-random-and-urandom-are-0666.patch
+Patch4: 0004-rules-add-REMOVE_CMD-rule.patch
+Patch5: 0005-track-move-events-to-rename-database-and-failed-fi.patch
+Patch6: 0006-rules-Gentoo-update.patch
+Patch7: 0007-rules-add-i2o-driver-rule.patch
+Patch8: 0008-man-recreate-man-pages.patch
+Patch9: 0009-volume_id-fix-linux_raid-metadata-version-1.0-detec.patch
+Patch10: 0010-rules-Gentoo-update.patch
+Patch11: 0011-add-name-substitution.patch
+Patch12: 0012-do-not-delete-the-device-node-with-ignore_remove-bu.patch
+Patch13: 0013-print-warning-for-invalid-TEST-operations.patch
+Patch14: 0014-rules-do-not-delete-lib-udev-devices-nodes-on-re.patch
+Patch15: 0015-rules-remove-broken-nvram-group-assignment-without.patch
+Patch16: 0016-add-dev-rtc-symlink-if-new-rtc-drivers-are-used.patch
+Patch17: 0017-increase-WAIT_FOR_SYSFS-timeout-to-10-seconds.patch
+Patch18: 0018-correct-includes-in-udev_selinux.c.patch
+Patch19: 0019-rules-put-bsd-nodes-in-dev-bsd-directory.patch
+Patch20: 0020-path_id-fix-for-stacked-class-devices.patch
+Patch21: 0021-check-line-length-after-comment-check-and-whitespace.patch
+Patch22: 0022-only-install-.rules.patch
+Patch23: 0023-ignore-device-node-names-while-restoring-symlinks-fr.patch
+Patch24: 0024-use-SEQNUM-in-dev-.udev-queue-instead-of-devpath.patch
+Patch25: 0025-rules-add-memstick-module-loading.patch
+Patch26: 0026-remove-extra-space-from-udevinfo-symlink-output.patch
+Patch27: 0027-udevinfo-simplify-symlink-printing-logic.patch
+Patch28: 0028-prevent-wrong-symlink-creation-if-database-disagress.patch
+Patch29: 0029-fix-wrong-variable-used-in-logged-string.patch
+Patch30: 0030-update-README.patch
+Patch31: 0031-rule_generator-move-all-policy-from-write_net_rules.patch
+
+Patch100: udev-089-nopie.patch
+Patch101: udev-091-lib64.patch
 
 ExclusiveOS: Linux
 URL: http://kernel.org/pub/linux/utils/kernel/hotplug/
@@ -71,14 +99,39 @@
 
 %prep
 %setup -q  
-%patch1 -p1 -b .rhpermconv
-%patch2 -p1 -b .rhrules
-%patch5 -p1 -b .rhextras
-%patch7 -p1 -b .nopie
-%patch9 -p1 -b .lib64
-%patch14 -p1 -b .dbgwait
+%patch1 -p1 -b .git1
+%patch2 -p1 -b .git2
+%patch3 -p1 -b .git3
+%patch4 -p1 -b .git4
+%patch5 -p1 -b .git5
+%patch6 -p1 -b .git6
+%patch7 -p1 -b .git7
+%patch8 -p1 -b .git8
+%patch9 -p1 -b .git9
+%patch10 -p1 -b .git10
+%patch11 -p1 -b .git11
+%patch12 -p1 -b .git12
+%patch13 -p1 -b .git13
+%patch14 -p1 -b .git14
+%patch15 -p1 -b .git15
+%patch16 -p1 -b .git16
+%patch17 -p1 -b .git17
+%patch18 -p1 -b .git18
+%patch19 -p1 -b .git19
+%patch20 -p1 -b .git20
+%patch21 -p1 -b .git21
+%patch22 -p1 -b .git22
+%patch25 -p1 -b .git25
+%patch26 -p1 -b .git26
+%patch27 -p1 -b .git27
+%patch28 -p1 -b .git28
+%patch29 -p1 -b .git29
+%patch30 -p1 -b .git30
+%patch31 -p1 -b .git31
+
+%patch100 -p1 -b .nopie
+%patch101 -p1 -b .lib64
 
-rm -f etc/udev/redhat/51-hotplug.rules
 %build
 
 %if %{with_static}
@@ -98,6 +151,7 @@
 	extras/usb_id \
 	extras/edd_id \
 	extras/volume_id \
+	extras/cdrom_id \
 	extras/floppy \
 	" all
 
@@ -106,6 +160,7 @@
 	extras/ata_id/ata_id \
 	extras/edd_id/edd_id \
 	extras/usb_id/usb_id \
+	extras/cdrom_id/cdrom_id \
 	extras/volume_id/vol_id \
 	extras/floppy/create_floppy_devices \
 	; do
@@ -131,11 +186,12 @@
 	extras/edd_id \
 	extras/path_id \
 	extras/volume_id \
+	extras/cdrom_id \
 	extras/floppy \
+	extras/rule_generator \
+	extras/firmware \
 	" all
 
-%{__cc} %{optflags} -fpie -pie -o firmware_helper %{SOURCE10}
-
 %install
 rm -rf $RPM_BUILD_ROOT
 
@@ -151,7 +207,10 @@
 	extras/edd_id \
 	extras/path_id \
 	extras/volume_id \
+	extras/cdrom_id \
 	extras/floppy \
+	extras/rule_generator \
+	extras/firmware \
 	" install
 
 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/udev/udev.rules
@@ -184,10 +243,19 @@
 %endif
 
 for i in \
-	etc/udev/redhat/06-udev-rh-early.rules \
-	etc/udev/redhat/50-udev.rules \
-	etc/udev/redhat/95-pam-console.rules \
-	etc/udev/rules.d/*.rules \
+	etc/udev/redhat/*.rules \
+%ifarch ia64
+	etc/udev/packages/40-ia64.rules \
+%endif
+%ifarch ppc ppc64
+	etc/udev/packages/40-ppc.rules \
+%endif
+%ifarch s390 s390x
+	etc/udev/packages/40-s390.rules \
+%endif
+	etc/udev/packages/40-alsa.rules \
+	etc/udev/packages/64-md-raid.rules \
+	etc/udev/packages/64-device-mapper.rules \
 	; do
 	install -m 0644 "$i"  "$RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/${i##*/}"
 done
@@ -196,16 +264,11 @@
 
 mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices}
 
-for i in load_floppy_module.sh check-cdrom.sh udevpermconv.sh; do
-	install -m 0755 extras/$i $RPM_BUILD_ROOT%{udev_scriptdir}
-done
-
 install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/udev/makedev.d/50-udev.nodes
 install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{udev_scriptdir}/fw_unit_symlinks.sh
 
 mkdir -p $RPM_BUILD_ROOT%{_datadir}/udev
 install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT/sbin/start_udev
-install -m 0755 firmware_helper $RPM_BUILD_ROOT/sbin
 #install -m 0755 udevtrigger $RPM_BUILD_ROOT/sbin
 
 mkdir -p -m 0755 $RPM_BUILD_ROOT%{firmwaredir}
@@ -217,6 +280,8 @@
 exec /sbin/modprobe -a nvram floppy >/dev/null 2>&1 &
 EOF
 
+mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
+install -m 0755 %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/udev-post
 
 %preun
 if [ $1 = 0 -a -f %{_initrddir}/udev ]; then
@@ -228,6 +293,7 @@
 	fi
 	/sbin/chkconfig --del udev
 fi
+/sbin/chkconfig --del udev-post
 exit 0
 
 %post
@@ -238,6 +304,7 @@
 		/sbin/udevd -d
 	fi
 fi
+chkconfig --add udev-post
 exit 0
 
 %triggerpostun -- dev <= 0:3.12-1
@@ -275,13 +342,15 @@
 %attr(0755,root,root) %{udev_scriptdir}/edd_id
 %attr(0755,root,root) %{udev_scriptdir}/usb_id
 %attr(0755,root,root) %{udev_scriptdir}/vol_id
+%attr(0755,root,root) %{udev_scriptdir}/cdrom_id
 %attr(0755,root,root) %{udev_scriptdir}/path_id
 %attr(0755,root,root) %{udev_scriptdir}/create_floppy_devices
-%attr(0755,root,root) %{udev_scriptdir}/check-cdrom.sh
-%attr(0755,root,root) %{udev_scriptdir}/udevpermconv.sh
-%attr(0755,root,root) %{udev_scriptdir}/load_floppy_module.sh
 %attr(0755,root,root) %{udev_scriptdir}/fw_unit_symlinks.sh
-%attr(0755,root,root) /sbin/firmware_helper
+%attr(0755,root,root) %{udev_scriptdir}/firmware.sh
+%attr(0755,root,root) %{udev_scriptdir}/rule_generator.functions
+%attr(0755,root,root) %{udev_scriptdir}/write_cd_rules
+%attr(0755,root,root) %{udev_scriptdir}/write_net_rules
+%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-post
 %attr(0755,root,root) %{_bindir}/udevtest
 %attr(0755,root,root) %{_bindir}/udevinfo
 %attr(0755,root,root) %{_sbindir}/udevmonitor
@@ -308,6 +377,7 @@
 %attr(0644,root,root) %{_mandir}/man8/edd_id*.8*
 %attr(0644,root,root) %{_mandir}/man8/vol_id*.8*
 %attr(0644,root,root) %{_mandir}/man8/path_id*.8*
+%attr(0644,root,root) %{_mandir}/man8/cdrom_id*.8*
 %attr(0644,root,root) %{_mandir}/man8/create_floppy_devices*.8*
 
 # Deprecated, but keep the ownership
@@ -342,8 +412,40 @@
 %{_libdir}/pkgconfig/libvolume_id.pc 
 
 %changelog
+* Fri Sep 21 2007 Harald Hoyer <harald at redhat.com> - 115-4
+- more upstream fixes from git
+
+* Thu Sep 20 2007 Harald Hoyer <harald at redhat.com> - 115-3
+- some upstream fixes from git
+- removed last_rule for loop rules
+- added "udevinfo udevtrace" kernel command line options for better debugging
+
+* Fri Sep 07 2007 Harald Hoyer <harald at redhat.com> - 115-2
+- some upstream fixes from git
+- last_rule for loop rules (speedup for live-cds/qemu with 128 loop devices)
+
+* Thu Aug 24 2007 Harald Hoyer <harald at redhat.com> - 115-1
+- version 115
+
+* Thu Aug 23 2007 Harald Hoyer <harald at redhat.com> - 114-4
+- added patch to prevent persistent net rules for virtual network interfaces,
+  like vmware and vlans
+
+* Thu Aug 23 2007 Harald Hoyer <harald at redhat.com> - 114-3
+- changed license tag
+- changed to latest upstream rule ordering
+
+* Mon Aug 13 2007 Harald Hoyer <harald at redhat.com> - 114-2
+- fixed isapnp rule (bug #251815)
+- fix for nikon cameras (bug #251401)
+
+* Fri Aug 10 2007 Harald Hoyer <harald at redhat.com> - 114-1
+- version 114
+- big rule unification and cleanup
+- added persistent names for network and cdrom devices over reboot
+
 * Fri Aug 24 2007 Harald Hoyer <harald at redhat.com> - 113-12
-- removed /dev/tape symlink, because it's now a directory 
+- removed /dev/tape symlink, because it's now a directory
   (bug #251755)
 
 * Thu Aug 16 2007 Harald Hoyer <harald at redhat.com> - 113-11


--- udev-095-dbgwait.patch DELETED ---


--- udev-106-selinuxmedia.patch DELETED ---


--- udev-106-setenv.patch DELETED ---


--- udev-extras.patch DELETED ---


--- udev-permconv.patch DELETED ---


--- udev-rules.patch DELETED ---




More information about the fedora-extras-commits mailing list