More robusst comment-ignoring in kboot parser.
authorJeremy Kerr <jk@ozlabs.org>
Thu, 5 Apr 2007 09:24:25 +0000 (19:24 +1000)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 5 Apr 2007 09:24:25 +0000 (19:24 +1000)
The previous check wouldn't ignore comment lines that contain an '='.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
devices/kboot-parser.c

index b845d8498779184a5bbe576f9c7c45161838fab0..448575929abc1fa9e7e3cefbe13ab4a64dbc9f59 100644 (file)
@@ -171,6 +171,9 @@ static void parse_buf(struct device *dev, char *buf)
                if (name == NULL || param_is_ignored(name))
                        continue;
 
                if (name == NULL || param_is_ignored(name))
                        continue;
 
+               if (*name == '#')
+                       continue;
+
                memset(&opt, 0, sizeof(opt));
                opt.name = strdup(name);
 
                memset(&opt, 0, sizeof(opt));
                opt.name = strdup(name);