From 93065a40773611096f2b1e095563ae21c5056c93 Mon Sep 17 00:00:00 2001 From: Samuel Mendoza-Jonas Date: Mon, 27 Aug 2018 14:34:57 +1000 Subject: discover/kboot-parser: Recognise 'default' parameter The kboot parser doesn't set a default option. Change it so that if we see the 'default' parameter we match against this value when deciding if an option should be set as default. For example: default=linux linux='/vmlinux initrd=/initrd arg1=value1 arg2' Signed-off-by: Samuel Mendoza-Jonas --- discover/kboot-parser.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'discover') diff --git a/discover/kboot-parser.c b/discover/kboot-parser.c index e4b36b6..4c68cd4 100644 --- a/discover/kboot-parser.c +++ b/discover/kboot-parser.c @@ -126,6 +126,10 @@ out_add: " dtb=%s", dtb); } + if (conf_get_global_option(conf, "default")) + opt->is_default = streq(opt->name, + conf_get_global_option(conf, "default")); + conf_strip_str(opt->boot_args); conf_strip_str(opt->description); @@ -137,6 +141,7 @@ static struct conf_global_option kboot_global_options[] = { { .name = "initrd" }, { .name = "root" }, { .name = "video" }, + { .name = "default" }, { .name = NULL } }; @@ -157,7 +162,6 @@ static const char *const kboot_conf_files[] = { }; static const char *const kboot_ignored_names[] = { - "default", "delay", "message", "timeout", -- cgit v1.2.1