[PATCH] fixup! commands: boot: add support for overriding boot artifacts
Ahmad Fatoum
a.fatoum at pengutronix.de
Sat Feb 15 04:29:02 PST 2025
This allows e.g. adding an initrd, when none was specified before.
Otherwise, we would run into a NULL pointer exception.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
common/bootm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/bootm.c b/common/bootm.c
index dd9ba2eae3b2..fe4d51681d73 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -152,7 +152,7 @@ static bool bootm_get_override(char **oldpath, const char *newpath)
if (!newpath)
return false;
- if (oldpath && strcmp(*oldpath, newpath)) {
+ if (oldpath && !streq_ptr(*oldpath, newpath)) {
free(*oldpath);
*oldpath = *newpath ? xstrdup(newpath) : NULL;
}
--
2.39.5
More information about the barebox
mailing list