Patchwork [U-Boot,v2,3/3] common/cmd_ximg.c: add ifdef protection for gzip uncompression

login
register
mail settings
Submitter Matthew McClintock
Date May 24, 2011, 3:48 p.m.
Message ID <1306252106-32358-1-git-send-email-msm@freescale.com>
Download mbox | patch
Permalink /patch/97177/
State Accepted
Commit 0e0996ef4fb340bd91ce6588a998cdaf10f43a42
Headers show

Comments

Matthew McClintock - May 24, 2011, 3:48 p.m.
Print a message if we do not have the ability to uncompress a gzip
image. Before, u-boot would just assume the routines were available

Signed-off-by: Matthew McClintock <msm@freescale.com>
---
v2: If gzip is not available block out case statement and let it fall through
    to the default case

 common/cmd_ximg.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Wolfgang Denk - July 26, 2011, 12:28 p.m.
Dear Matthew McClintock,

In message <1306252106-32358-1-git-send-email-msm@freescale.com> you wrote:
> Print a message if we do not have the ability to uncompress a gzip
> image. Before, u-boot would just assume the routines were available
> 
> Signed-off-by: Matthew McClintock <msm@freescale.com>
> ---
> v2: If gzip is not available block out case statement and let it fall through
>     to the default case
> 
>  common/cmd_ximg.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/common/cmd_ximg.c b/common/cmd_ximg.c
index dceb975..850188e 100644
--- a/common/cmd_ximg.c
+++ b/common/cmd_ximg.c
@@ -215,6 +215,7 @@  do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 			memmove ((char *) dest, (char *)data, len);
 #endif	/* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */
 			break;
+#ifdef CONFIG_GZIP
 		case IH_COMP_GZIP:
 			printf ("   Uncompressing part %d ... ", part);
 			if (gunzip ((void *) dest, unc_len,
@@ -223,6 +224,7 @@  do_imgextract(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 				return 1;
 			}
 			break;
+#endif
 #if defined(CONFIG_BZIP2)
 		case IH_COMP_BZIP2:
 			{