discover/grub2: Populate option ids
[petitboot] / 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)");
        }
+       opt->option->id = talloc_asprintf(opt->option, "%s#%s",
+                       script->ctx->device->device->id,
+                       opt->option->name);
 
        script->opt = opt;