summaryrefslogtreecommitdiffstats
path: root/common/blspec.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/blspec.c')
-rw-r--r--common/blspec.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/blspec.c b/common/blspec.c
index 1a6d581f5a..9e1036c834 100644
--- a/common/blspec.c
+++ b/common/blspec.c
@@ -298,6 +298,18 @@ static struct blspec_entry *blspec_entry_open(struct bootentries *bootentries,
val = end;
+ if (!strcmp(name, "options")) {
+ /* If there was a previous "options" key given, prepend its value
+ * (as per spec). */
+ const char *prev_val = blspec_entry_var_get(entry, name);
+ if (prev_val) {
+ char *opts = xasprintf("%s %s", prev_val, val);
+ blspec_entry_var_set(entry, name, opts);
+ free(opts);
+ continue;
+ }
+ }
+
blspec_entry_var_set(entry, name, val);
}