discover/grub2: Populate option ids
authorJeremy Kerr <jk@ozlabs.org>
Tue, 17 Sep 2013 06:51:02 +0000 (14:51 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Tue, 24 Sep 2013 05:14:59 +0000 (13:14 +0800)
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
discover/grub2/script.c

index 239ae38f5e67306408e7c386abc050b03ec5d4d6..67b4b7801f8717d51df2cdbfc68edab97988f082 100644 (file)
@@ -304,6 +304,9 @@ int statement_menuentry_execute(struct grub2_script *script,
        } else {
                opt->option->name = talloc_strdup(opt, "(unknown)");
        }
        } else {
                opt->option->name = talloc_strdup(opt, "(unknown)");
        }
+       opt->option->id = talloc_asprintf(opt->option, "%s#%s",
+                       script->ctx->device->device->id,
+                       opt->option->name);
 
        script->opt = opt;
 
 
        script->opt = opt;