diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile | 2 | ||||
-rw-r--r-- | tools/easylogo/easylogo.c | 2 | ||||
-rw-r--r-- | tools/env/Makefile | 2 | ||||
-rw-r--r-- | tools/env/fw_env.c | 21 | ||||
-rw-r--r-- | tools/env/fw_env.h | 10 | ||||
-rw-r--r-- | tools/env/fw_env_main.c | 25 | ||||
-rw-r--r-- | tools/gdb/remote.c | 2 |
7 files changed, 36 insertions, 28 deletions
diff --git a/tools/Makefile b/tools/Makefile index dc210e8..8533a8e 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -228,7 +228,7 @@ else HOSTOS=$(HOSTOS) \ HOSTARCH=$(HOSTARCH) \ HOST_CFLAGS="$(HOST_CFLAGS)" \ - HOST_LDFLAGS="$(HOST_LDFLAGS)" \ + HOST_LDFLAGS="$(HOST_LDFLAGS)" \ -C $$dir || exit 1 ; \ done endif diff --git a/tools/easylogo/easylogo.c b/tools/easylogo/easylogo.c index c20e6a7..00a1e4e 100644 --- a/tools/easylogo/easylogo.c +++ b/tools/easylogo/easylogo.c @@ -332,7 +332,7 @@ int image_save_header (image_t * image, char *filename, char *varname) if (col) fprintf (file, "%s\n", str); - /* End of declaration */ + /* End of declaration */ fprintf (file, "};\n\n"); /* Variable */ fprintf (file, "fastimage_t %s = {\n", varname); diff --git a/tools/env/Makefile b/tools/env/Makefile index ea2d5b5..9629ee5 100644 --- a/tools/env/Makefile +++ b/tools/env/Makefile @@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk SRCS := $(obj)crc32.c fw_env.c fw_env_main.c HEADERS := fw_env.h -CPPFLAGS := -Wall -DUSE_HOSTCC +CPPFLAGS := -Wall -DUSE_HOSTCC -I$(SRCTREE)/include ifeq ($(MTD_VERSION),old) CPPFLAGS += -DMTD_OLD diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index e083a5b..b8bca91 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000-2003 + * (C) Copyright 2000-2008 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * See file CREDITS for list of people who contributed to this @@ -209,13 +209,14 @@ char *fw_getenv (char *name) * Print the current definition of one, or more, or all * environment variables */ -void fw_printenv (int argc, char *argv[]) +int fw_printenv (int argc, char *argv[]) { char *env, *nxt; int i, n_flag; + int rc = 0; if (env_init ()) - return; + return (-1); if (argc == 1) { /* Print all env variables */ for (env = environment.data; *env; env = nxt + 1) { @@ -223,13 +224,13 @@ void fw_printenv (int argc, char *argv[]) if (nxt >= &environment.data[ENV_SIZE]) { fprintf (stderr, "## Error: " "environment not terminated\n"); - return; + return (-1); } } printf ("%s\n", env); } - return; + return (0); } if (strcmp (argv[1], "-n") == 0) { @@ -239,7 +240,7 @@ void fw_printenv (int argc, char *argv[]) if (argc != 2) { fprintf (stderr, "## Error: " "`-n' option requires exactly one argument\n"); - return; + return (-1); } } else { n_flag = 0; @@ -255,7 +256,7 @@ void fw_printenv (int argc, char *argv[]) if (nxt >= &environment.data[ENV_SIZE]) { fprintf (stderr, "## Error: " "environment not terminated\n"); - return; + return (-1); } } val = envmatch (name, env); @@ -268,9 +269,13 @@ void fw_printenv (int argc, char *argv[]) break; } } - if (!val) + if (!val) { fprintf (stderr, "## Error: \"%s\" not defined\n", name); + rc = -1; + } } + + return (rc); } /* diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h index 58607de..c04da54 100644 --- a/tools/env/fw_env.h +++ b/tools/env/fw_env.h @@ -1,5 +1,5 @@ /* - * (C) Copyright 2002 + * (C) Copyright 2002-2008 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * See file CREDITS for list of people who contributed to this @@ -42,12 +42,12 @@ #define CONFIG_BAUDRATE 115200 #define CONFIG_BOOTDELAY 5 /* autoboot after 5 seconds */ #define CONFIG_BOOTCOMMAND \ - "bootp; " \ - "setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} " \ - "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \ + "bootp; " \ + "setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} " \ + "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; " \ "bootm" -extern void fw_printenv(int argc, char *argv[]); +extern int fw_printenv(int argc, char *argv[]); extern char *fw_getenv (char *name); extern int fw_setenv (int argc, char *argv[]); diff --git a/tools/env/fw_env_main.c b/tools/env/fw_env_main.c index 696e30e..7f631c4 100644 --- a/tools/env/fw_env_main.c +++ b/tools/env/fw_env_main.c @@ -1,5 +1,5 @@ /* - * (C) Copyright 2000 + * (C) Copyright 2000-2008 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * * See file CREDITS for list of people who contributed to this @@ -25,15 +25,16 @@ * Command line user interface to firmware (=U-Boot) environment. * * Implements: - * fw_printenv [ name ... ] - * - prints the values of the environment variables - * "name", or the whole environment if no names are - * specified + * fw_printenv [[ -n name ] | [ name ... ]] + * - prints the value of a single environment variable + * "name", the ``name=value'' pairs of one or more + * environment variables "name", or the whole + * environment if no names are specified. * fw_setenv name [ value ... ] * - If a name without any values is given, the variable * with this name is deleted from the environment; * otherwise, all "value" arguments are concatenated, - * separated by sinlge blank characters, and the + * separated by single blank characters, and the * resulting string is assigned to the environment * variable "name" */ @@ -58,16 +59,18 @@ main(int argc, char *argv[]) if (strcmp(cmdname, CMD_PRINTENV) == 0) { - fw_printenv (argc, argv); + if (fw_printenv (argc, argv) != 0) + return (EXIT_FAILURE); - return (EXIT_SUCCESS); + return (EXIT_SUCCESS); } else if (strcmp(cmdname, CMD_SETENV) == 0) { - if (fw_setenv (argc, argv) != 0) - return (EXIT_FAILURE); + if (fw_setenv (argc, argv) != 0) + return (EXIT_FAILURE); + + return (EXIT_SUCCESS); - return (EXIT_SUCCESS); } fprintf (stderr, diff --git a/tools/gdb/remote.c b/tools/gdb/remote.c index f40b6c6..c76a7ba 100644 --- a/tools/gdb/remote.c +++ b/tools/gdb/remote.c @@ -268,7 +268,7 @@ remote_continue(void) remote restart RXX Restart the remote server - extended ops ! Use the extended remote protocol. + extended ops ! Use the extended remote protocol. Sticky -- only needs to be set once. kill request k |