summaryrefslogtreecommitdiff
path: root/boot/vbe_simple_os.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-10-21 03:23:12 +0300
committerTom Rini <trini@konsulko.com>2022-10-31 18:03:36 +0300
commite45d22655aed0c81fa5890f47c1647c6e95bedb6 (patch)
tree3a53749d09f992266d063a774a0e235a563a5a37 /boot/vbe_simple_os.c
parentc263e21bcb01f19e6ccb2452fdcc601ff84942db (diff)
downloadu-boot-e45d22655aed0c81fa5890f47c1647c6e95bedb6.tar.xz
vbe: Drop the U-Boot prefix from the version
We don't need the U-Boot prefix on the version and in fact it is harmful since pytest gets confused seeing the U-Boot banner bring displayed when the version is printed. Drop the prefix from the string. We could produce an entirely new string from the component parts, but this adds to the rodata size and would break the use of version_string as the only thing which holds this information. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/vbe_simple_os.c')
-rw-r--r--boot/vbe_simple_os.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/boot/vbe_simple_os.c b/boot/vbe_simple_os.c
index 7761b9ef65..058db6154b 100644
--- a/boot/vbe_simple_os.c
+++ b/boot/vbe_simple_os.c
@@ -18,7 +18,7 @@
int vbe_simple_fixup_node(ofnode node, struct simple_state *state)
{
- char *version;
+ const char *version, *str;
int ret;
version = strdup(state->fw_version);
@@ -31,7 +31,12 @@ int vbe_simple_fixup_node(ofnode node, struct simple_state *state)
ret = ofnode_write_u32(node, "cur-vernum", state->fw_vernum);
if (ret)
return log_msg_ret("num", ret);
- ret = ofnode_write_string(node, "bootloader-version", version_string);
+
+ /* Drop the 'U-Boot ' at the start */
+ str = version_string;
+ if (!strncmp("U-Boot ", str, 7))
+ str += 7;
+ ret = ofnode_write_string(node, "bootloader-version", str);
if (ret)
return log_msg_ret("bl", ret);