From 8c456c5e33d65d7655d6911b3f1cda722d6849fe Mon Sep 17 00:00:00 2001 From: GuEe-GUI <2991707448@qq.com> Date: Tue, 10 Sep 2024 13:24:49 +0800 Subject: [PATCH] [FIXUP/OFW] remove the last empty string for bootargs Signed-off-by: GuEe-GUI <2991707448@qq.com> --- components/drivers/ofw/ofw.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/drivers/ofw/ofw.c b/components/drivers/ofw/ofw.c index bbda776177..1f9a456aff 100644 --- a/components/drivers/ofw/ofw.c +++ b/components/drivers/ofw/ofw.c @@ -386,6 +386,11 @@ const char *rt_ofw_bootargs_select(const char *key, int index) { *(char *)ch++ = '\0'; } + if (*ch == '\0') + { + /* space in the end */ + --bootargs_nr; + } --ch; }