[PATCH] fixup! commands: boot: add support for overriding boot artifacts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux