the busybox-1.10.1-mdev.patch in fixes-1.10.1 break things

Natanael Copa natanael.copa at gmail.com
Fri May 2 12:12:50 UTC 2008


Attatched is a patch that fixes a bug introduced in the
fixes-1.10.1/busybox-1.10.1-mdev.patch that make mdev -s fail on
existing mdev.conf files.

It should be applied after the busybox-1.10.1-mdev.patch.

Below is a diff with --ignore-space-change option to show exactly what
this patch does.

Please put the attatched diff in the fixes-1.10.1 dir.

btw... why was the mdev patch added there in firstplace? I thought fixes
should only contain fixes and not new features.


# diff -bu util-linux/mdev.c.patched util-linux/mdev.c
--- util-linux/mdev.c.patched	2008-05-02 11:08:49 +0000
+++ util-linux/mdev.c	2008-05-02 11:45:30 +0000
@@ -161,14 +161,15 @@
 			if (ENABLE_FEATURE_MDEV_RENAME) {
 				if (!next)
 					break;
+				if (*next == '>') {
 				val = next;
 				next = next_field(val);
-				if (*val == '>') {
-#if ENABLE_FEATURE_MDEV_RENAME_REGEXP
+					if (ENABLE_FEATURE_MDEV_RENAME_REGEXP) {
 					/* substitute %1..9 with off[1..9], if any */
 					char *s, *p;
 					unsigned i, n;
-
+						val = next;
+						next = next_field(val);
 					n = 0;
 					s = val;
 					while (*s && *s++ == '%')
@@ -190,9 +191,9 @@
 						p++;
 						s++;
 					}
-#else
+					} else {
 					alias = xstrdup(val + 1);
-#endif
+					}
 				}
 			}
 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: busybox-1.10.1-mdev2.patch
Type: text/x-patch
Size: 1666 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20080502/fd6560bd/attachment-0002.bin 


More information about the busybox mailing list