[PATCH] report "Bad inittab entry: " for empty line

Denis Vlasenko vda.linux at googlemail.com
Tue Jan 29 01:55:23 PST 2008


On Friday 11 January 2008 08:07, 温曙光 wrote:
> hello:
>     when i boot, many "bad inittab entry" was printed.
>     i saw it's a simple problem.
> 
> endo at endo-lab:/usr/src/busybox$ svn diff
> Index: init/init.c
> ===================================================================
> --- init/init.c (revision 20841)
> +++ init/init.c (working copy)
> @@ -757,7 +757,7 @@
>                 /* Skip leading spaces */
>                 id = skip_whitespace(buf);
>                 /* Skip the line if it's a comment */
> -               if (*id == '#' || *id == '\n')
> +               if (*id == '#' || *id == '\n' || (*id == '\0'))
>                         continue;
>                 /* Trim the trailing '\n' */
>                 *strchrnul(id, '\n') = '\0';
> 

Applied, thanks!
--
vda


More information about the busybox mailing list