summaryrefslogtreecommitdiff
path: root/components/drivers
diff options
context:
space:
mode:
authorGuEe-GUI <[email protected]>2024-09-10 13:24:49 +0800
committerMeco Man <[email protected]>2024-09-13 17:33:29 -0400
commit8c456c5e33d65d7655d6911b3f1cda722d6849fe (patch)
treea9d05e0cceefc9f14a8b4e7347246c8d8d5ab908 /components/drivers
parent06211b8be1b7e9848744c658ed4c60ba4b846f1f (diff)
[FIXUP/OFW] remove the last empty string for bootargs
Signed-off-by: GuEe-GUI <[email protected]>
Diffstat (limited to 'components/drivers')
-rw-r--r--components/drivers/ofw/ofw.c5
1 files changed, 5 insertions, 0 deletions
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;
}