[U-Boot] [PATCH 2/3] common/cmd_nand.c: add ifdef protection for do_bootm

Mike Frysinger vapier at gentoo.org
Tue May 24 05:12:52 CEST 2011


On Monday, May 23, 2011 14:29:12 Matthew McClintock wrote:
> Right now we do not check if do_bootm is actually built into this
> u-boot. Instead check define and only call do_bootm if it's actually
> available.

basic idea is sound ...

> --- a/common/cmd_nand.c
> +++ b/common/cmd_nand.c
> @@ -806,9 +806,11 @@
>  		local_args[0] = cmd;
>  		local_args[1] = NULL;
> 
> +#ifdef	CONFIG_CMD_BOOTM
>  		printf("Automatic boot of image at addr 0x%08lx ...\n", addr);
> 
>  		do_bootm(cmdtp, 0, 1, local_args);
> +#endif
>  		return 1;
>  	}
>  	return 0;

there should be a space after the "#ifdef", not a tab.  and the ifdef should 
be around the local_args[] too.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20110523/154ab8b8/attachment.pgp 


More information about the U-Boot mailing list