busybox: replace my mdev fix with upstream solution (svn r24785)
authorMarcin Juszkiewicz <hrw@koansoftware.com>
Mon, 12 Jan 2009 11:11:17 +0000 (12:11 +0100)
committerMarcin Juszkiewicz <hrw@koansoftware.com>
Fri, 16 Jan 2009 14:37:50 +0000 (15:37 +0100)
packages/busybox/busybox-1.13.2/mdev-fix.patch [deleted file]
packages/busybox/busybox-1.13.2/r24785.patch [new file with mode: 0644]
packages/busybox/busybox_1.13.2.bb

diff --git a/packages/busybox/busybox-1.13.2/mdev-fix.patch b/packages/busybox/busybox-1.13.2/mdev-fix.patch
deleted file mode 100644 (file)
index 115a5f4..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
----
- util-linux/mdev.c |    3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- busybox-1.13.2.orig/util-linux/mdev.c
-+++ busybox-1.13.2/util-linux/mdev.c
-@@ -107,11 +107,11 @@ static void make_device(char *path, int 
- #if ENABLE_FEATURE_MDEV_CONF
-       parser = config_open2("/etc/mdev.conf", fopen_for_read);
-       /* If we have config file, look up user settings */
--      while (config_read(parser, tokens, 4, 3, "# \t", PARSE_NORMAL)) {
-+      while (config_read(parser, tokens, 5, 3, "# \t", PARSE_NORMAL)) {
-               regmatch_t off[1 + 9*ENABLE_FEATURE_MDEV_RENAME_REGEXP];
-               char *val;
-               /* Fields: regex uid:gid mode [alias] [cmd] */
-@@ -210,10 +210,11 @@ static void make_device(char *path, int 
- #endif
-               }
- #endif /* ENABLE_FEATURE_MDEV_RENAME */
- #if ENABLE_FEATURE_MDEV_EXEC
-+              val = tokens[4];
-               /* The rest (opt): command to run */
-               if (!val)
-                       break;
-               {
-                       const char *s = "@$*";
diff --git a/packages/busybox/busybox-1.13.2/r24785.patch b/packages/busybox/busybox-1.13.2/r24785.patch
new file mode 100644 (file)
index 0000000..e3e80be
--- /dev/null
@@ -0,0 +1,14 @@
+--- busybox/util-linux/mdev.c  2009/01/08 17:19:01     24725
++++ busybox/util-linux/mdev.c  2009/01/12 07:57:52     24785
+@@ -179,8 +179,9 @@
+                       unsigned i, n;
+ #endif
+                       char *a = val;
+-                      s = strchr(val, ' ');
+-                      val = (s && s[1]) ? s+1 : NULL;
++                      s = strchrnul(val, ' ');
++                      val = (s[0] && s[1]) ? s+1 : NULL;
++                      s[0] = '\0';
+ #if ENABLE_FEATURE_MDEV_RENAME_REGEXP
+                       /* substitute %1..9 with off[1..9], if any */
+                       n = 0;
index 2172967..7a57315 100644 (file)
@@ -1,13 +1,13 @@
 require busybox.inc
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "\
   http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
   \
   file://udhcpscript.patch;patch=1 \
   file://B921600.patch;patch=1 \
-  file://mdev-fix.patch;patch=1 \
+  file://r24785.patch;patch=1;status=merged \
   file://find-touchscreen.sh \
   file://busybox-cron \
   file://busybox-httpd \