From dd3795d10ca6453e49462f93c6196a0e1ecc2b91 Mon Sep 17 00:00:00 2001 From: miod Date: Mon, 14 Aug 2023 13:49:42 +0000 Subject: [PATCH] Skip leading dash in kernel boot options instead of complaining it is an unknown option character. --- sys/arch/riscv64/riscv64/machdep.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/arch/riscv64/riscv64/machdep.c b/sys/arch/riscv64/riscv64/machdep.c index 6220cbe43cf..b6843711864 100644 --- a/sys/arch/riscv64/riscv64/machdep.c +++ b/sys/arch/riscv64/riscv64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.31 2023/08/05 05:45:52 guenther Exp $ */ +/* $OpenBSD: machdep.c,v 1.32 2023/08/14 13:49:42 miod Exp $ */ /* * Copyright (c) 2014 Patrick Wildt @@ -871,7 +871,7 @@ process_kernel_args(void) if (*cp++ == '\0') return; - while (*cp != 0) { + while (*++cp != 0) { switch (*cp) { case 'a': boothowto |= RB_ASKNAME; @@ -889,7 +889,6 @@ process_kernel_args(void) printf("unknown option `%c'\n", *cp); break; } - cp++; } } -- 2.20.1