Specifying the ALLOWOPTIONS directive doesn't have any effect at the
moment. Fix this so that if ALLOWOPTIONS 0 is used then command line
arguments are ignored.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
if (!allowimplicit)
goto bad_implicit;
+ /* Insert a null character to ignore any user-specified options */
+ if (!allowoptions) {
+ char *p = (char *)find_command(kernel);
+ *p = '\0';
+ }
+
type = parse_kernel_type(kernel);
if (type == KT_KERNEL) {
const char *ext;
ontimeout = refstrdup(skipspace(p + 9));
ontimeoutlen = strlen(ontimeout);
} else if (looking_at(p, "allowoptions")) {
- m->allowedit = !!atoi(skipspace(p + 12));
+ allowoptions = !!atoi(skipspace(p + 12));
} else if (looking_at(p, "ipappend")) {
if (ld.label)
ld.ipappend = atoi(skipspace(p + 8));