diff mbox series

[1/3] efi/libstub: Stop parsing arguments at "--"

Message ID 20200813185811.554051-2-nivedita@alum.mit.edu
State New
Headers show
Series [1/3] efi/libstub: Stop parsing arguments at "--" | expand

Commit Message

Arvind Sankar Aug. 13, 2020, 6:58 p.m. UTC
Arguments after "--" are arguments for init, not for the kernel.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
---
 drivers/firmware/efi/libstub/efi-stub-helper.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/firmware/efi/libstub/efi-stub-helper.c b/drivers/firmware/efi/libstub/efi-stub-helper.c
index 6bca70bbb43d..37ff34e7b85e 100644
--- a/drivers/firmware/efi/libstub/efi-stub-helper.c
+++ b/drivers/firmware/efi/libstub/efi-stub-helper.c
@@ -201,6 +201,8 @@  efi_status_t efi_parse_options(char const *cmdline)
 		char *param, *val;
 
 		str = next_arg(str, &param, &val);
+		if (!val && !strcmp(param, "--"))
+			break;
 
 		if (!strcmp(param, "nokaslr")) {
 			efi_nokaslr = true;