diff options
| author | Marian Balakowicz <m8@semihalf.com> | 2008-01-08 18:12:17 +0100 | 
|---|---|---|
| committer | Wolfgang Denk <wd@denx.de> | 2008-02-07 01:12:57 +0100 | 
| commit | f13e7b2e993c61fed1f607962501e051940d6e80 (patch) | |
| tree | 3894629f4d16c470f059ff4aa0d36e949103b79d /common/cmd_autoscript.c | |
| parent | 1ee1180b6e93e56d0282ac8d943e448e9d0eab20 (diff) | |
| download | olio-uboot-2014.01-f13e7b2e993c61fed1f607962501e051940d6e80.tar.xz olio-uboot-2014.01-f13e7b2e993c61fed1f607962501e051940d6e80.zip | |
[new uImage] Cleanup image header pointer use in bootm code
- use single image header pointer instead of a set of auxilliary variables.
- add multi component image helper routines: get component size/data address
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Diffstat (limited to 'common/cmd_autoscript.c')
| -rw-r--r-- | common/cmd_autoscript.c | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/common/cmd_autoscript.c b/common/cmd_autoscript.c index 3e68ced1f..53f8e8311 100644 --- a/common/cmd_autoscript.c +++ b/common/cmd_autoscript.c @@ -54,7 +54,7 @@ autoscript (ulong addr)  {  	ulong len;  	image_header_t *hdr = (image_header_t *)addr; -	ulong *len_ptr; +	ulong *data;  	char *cmd;  	int rcode = 0;  	int verify; @@ -84,9 +84,9 @@ autoscript (ulong addr)  	}  	/* get length of script */ -	len_ptr = (ulong *)image_get_data (hdr); +	data = (ulong *)image_get_data (hdr); -	if ((len = image_to_cpu (*len_ptr)) == 0) { +	if ((len = image_to_cpu (*data)) == 0) {  		puts ("Empty Script\n");  		return 1;  	} @@ -97,10 +97,10 @@ autoscript (ulong addr)  		return 1;  	} -	while (*len_ptr++); +	while (*data++);  	/* make sure cmd is null terminated */ -	memmove (cmd, (char *)len_ptr, len); +	memmove (cmd, (char *)data, len);  	*(cmd + len) = 0;  #ifdef CFG_HUSH_PARSER /*?? */ |