diff mbox

[U-Boot,09/14] image: Add a name for invalid types

Message ID 1467305540-13607-10-git-send-email-sjg@chromium.org
State Accepted
Commit 30495bff35d5a5134bc182fa51728acf69420158
Delegated to: Tom Rini
Headers show

Commit Message

Simon Glass June 30, 2016, 4:52 p.m. UTC
At present the name is NULL, which prevents qsort() fromp being used. Use
the name "invalid" instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 common/image.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Tom Rini July 2, 2016, 1:36 a.m. UTC | #1
On Thu, Jun 30, 2016 at 10:52:15AM -0600, Simon Glass wrote:

> At present the name is NULL, which prevents qsort() fromp being used. Use
> the name "invalid" instead.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini July 16, 2016, 1:48 p.m. UTC | #2
On Thu, Jun 30, 2016 at 10:52:15AM -0600, Simon Glass wrote:

> At present the name is NULL, which prevents qsort() fromp being used. Use
> the name "invalid" instead.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/common/image.c b/common/image.c
index 4e503b3..e9095f4 100644
--- a/common/image.c
+++ b/common/image.c
@@ -69,7 +69,7 @@  static const image_header_t *image_get_ramdisk(ulong rd_addr, uint8_t arch,
 #endif
 
 static const table_entry_t uimage_arch[] = {
-	{	IH_ARCH_INVALID,	NULL,		"Invalid ARCH",	},
+	{	IH_ARCH_INVALID,	"invalid",	"Invalid ARCH",	},
 	{	IH_ARCH_ALPHA,		"alpha",	"Alpha",	},
 	{	IH_ARCH_ARM,		"arm",		"ARM",		},
 	{	IH_ARCH_I386,		"x86",		"Intel x86",	},
@@ -97,7 +97,7 @@  static const table_entry_t uimage_arch[] = {
 };
 
 static const table_entry_t uimage_os[] = {
-	{	IH_OS_INVALID,	NULL,		"Invalid OS",		},
+	{	IH_OS_INVALID,	"invalid",	"Invalid OS",		},
 	{	IH_OS_LINUX,	"linux",	"Linux",		},
 #if defined(CONFIG_LYNXKDI) || defined(USE_HOSTCC)
 	{	IH_OS_LYNXOS,	"lynxos",	"LynxOS",		},
@@ -144,7 +144,7 @@  static const table_entry_t uimage_type[] = {
 	{	IH_TYPE_KERNEL_NOLOAD, "kernel_noload",  "Kernel Image (no loading done)", },
 	{	IH_TYPE_KWBIMAGE,   "kwbimage",   "Kirkwood Boot Image",},
 	{	IH_TYPE_IMXIMAGE,   "imximage",   "Freescale i.MX Boot Image",},
-	{	IH_TYPE_INVALID,    NULL,	  "Invalid Image",	},
+	{	IH_TYPE_INVALID,    "invalid",	  "Invalid Image",	},
 	{	IH_TYPE_MULTI,	    "multi",	  "Multi-File Image",	},
 	{	IH_TYPE_OMAPIMAGE,  "omapimage",  "TI OMAP SPL With GP CH",},
 	{	IH_TYPE_PBLIMAGE,   "pblimage",   "Freescale PBL Boot Image",},