X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=devices%2Fkboot-parser.c;h=448575929abc1fa9e7e3cefbe13ab4a64dbc9f59;hp=ba4fbf5f26bad3b6b43e49f8229aa3d18e967400;hb=fd3ec2d5f95590cf5fbfe065a8334b90e5fbde75;hpb=bdb389592338a2f69af98d763a39c617374c1233 diff --git a/devices/kboot-parser.c b/devices/kboot-parser.c index ba4fbf5..4485759 100644 --- a/devices/kboot-parser.c +++ b/devices/kboot-parser.c @@ -106,6 +106,7 @@ static int parse_option(struct boot_option *opt, char *config) opt->boot_image_file = join_paths(mountpoint, config); cmdline = malloc(buf_size); + *cmdline = 0; for (pos++; pos;) { pos = get_param_pair(pos, &name, &value, ' '); @@ -170,6 +171,9 @@ static void parse_buf(struct device *dev, char *buf) if (name == NULL || param_is_ignored(name)) continue; + if (*name == '#') + continue; + memset(&opt, 0, sizeof(opt)); opt.name = strdup(name);