Busybox-1.9.0 / mdev
George Boudreau
GeorgeB at Linux.ca
Wed Jan 23 18:01:38 UTC 2008
On Jan 23, 2008 10:49 AM, Mike Frysinger <vapier at gentoo.org> wrote:
> 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 ?
Yes, works like a charm.
> --- 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
>
More information about the busybox
mailing list