]> git.ozlabs.org Git - petitboot/blobdiff - devices/kboot-parser.c
Separate parsing infrastructure and add test wrapper
[petitboot] / devices / kboot-parser.c
index 27f302565d885e94373a825acd47c4c27e59e895..ef1f247b8b39ffd5ce879220d314933ca7ebf5d2 100644 (file)
@@ -10,7 +10,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#include "udev-helper.h"
+#include "parser.h"
 #include "params.h"
 
 #define buf_size 1024
@@ -121,6 +121,7 @@ static int parse_option(struct boot_option *opt, char *config)
                        root = value;
 
                } else {
+                       strcat(cmdline, " ");
                        *(value - 1) = '=';
                        strcat(cmdline, name);
                }
@@ -149,7 +150,7 @@ static int parse_option(struct boot_option *opt, char *config)
        printf("kboot cmdline: %s", cmdline);
        opt->boot_args = cmdline;
 
-       asprintf(&opt->description, "%s %s", opt->boot_image_file, cmdline);
+       asprintf(&opt->description, "%s %s", config, cmdline);
 
        return 1;
 }