]> git.ozlabs.org Git - petitboot/blobdiff - discover/event-parser.c
protocol: Separate device add from boot-option add messages
[petitboot] / discover / event-parser.c
index 0cfda9a027af1727a235d571c62b587d641c6304..1eec5c9cd410ca55f7a90a33f987e82a83a06c7d 100644 (file)
@@ -7,6 +7,12 @@
 #include "event.h"
 #include "parser-utils.h"
 
+/**
+ * parse_user_event - Parse a user event.
+ *
+ * Understands params: name, image, args.
+ */
+
 int parse_user_event(struct device *device, struct event *event)
 {
        struct boot_option *opt;
@@ -25,6 +31,7 @@ int parse_user_event(struct device *device, struct event *event)
        }
 
        opt->id = talloc_asprintf(opt, "%s#%s", device->id, p);
+       opt->device_id = talloc_strdup(opt, device->id);
        opt->name = talloc_strdup(opt, p);
 
        p = event_get_param(event, "image");