Busybox-1.9.0 / mdev

Mike Frysinger vapier at gentoo.org
Wed Jan 23 07:49:19 PST 2008


On Wednesday 23 January 2008, George Boudreau wrote:
> mdev no longer tolerates blank lines in mdev.conf. The following minor
> change restores that ability.

oops, i prob broke that

> --- busybox1.9.0/util-linux/mdev.c   2007-12-21 17:16:45.000000000 -0500
> +++ busybox-1.9.0/util-linux/mdev.c-m 2008-01-23 09:01:19.000000000 -0500
> @@ -148,7 +148,7 @@
>                        }
>
>                        /* Did everything parse happily? */
> -                       if (field <= 2)
> +                       if ((field) && (field <= 2))
>                                bb_error_msg_and_die("bad line %u",
> lineno);
>
>  next_line:

mmm, i dont like the smell of this as it looks pretty fragile ... could you 
see if this works for you instead ?
--- util-linux/mdev.c	(revision 20887)
+++ util-linux/mdev.c	(working copy)
@@ -78,8 +78,12 @@ static void make_device(char *path, int 
 					val = strtok(vline, " \t");
 					vline = NULL;
 				} while (val && !*val);
-				if (!val)
-					break;
+				if (!val) {
+					if (field)
+						break;
+					else
+						goto next_line;
+				}
 
 				if (field == 0) {
 
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: This is a digitally signed message part.
Url : http://busybox.net/lists/busybox/attachments/20080123/f41e0e9e/attachment.pgp 


More information about the busybox mailing list