summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-09-24 12:31:08 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2007-09-24 12:31:08 +0200
commit3cbc5c5c12f8419f563efa33153fc87d7158efbd (patch)
tree5e6f674b85f6e73cba5be7a645c7df38482dad55
parentb0615cc9096be1d2ed2813af3a0d850e1009b9d4 (diff)
downloadbarebox-3cbc5c5c12f8419f563efa33153fc87d7158efbd.tar.gz
barebox-3cbc5c5c12f8419f563efa33153fc87d7158efbd.tar.xz
remove u-boot command paramter flag
-rw-r--r--commands/bootm.c34
-rw-r--r--commands/cat.c2
-rw-r--r--commands/cd.c2
-rw-r--r--commands/clear.c2
-rw-r--r--commands/cp.c2
-rw-r--r--commands/crc.c2
-rw-r--r--commands/echo.c2
-rw-r--r--commands/edit.c2
-rw-r--r--commands/environment.c4
-rw-r--r--commands/exec.c2
-rw-r--r--commands/flash.c4
-rw-r--r--commands/go.c2
-rw-r--r--commands/loadb.c2
-rw-r--r--commands/loads.c2
-rw-r--r--commands/ls.c2
-rw-r--r--commands/mem.c8
-rw-r--r--commands/meminfo.c2
-rw-r--r--commands/memtest.c2
-rw-r--r--commands/mii.c4
-rw-r--r--commands/mkdir.c2
-rw-r--r--commands/mount.c2
-rw-r--r--commands/net.c12
-rw-r--r--commands/partition.c4
-rw-r--r--commands/pwd.c2
-rw-r--r--commands/reginfo.c2
-rw-r--r--commands/reset.c2
-rw-r--r--commands/rm.c2
-rw-r--r--commands/rmdir.c2
-rw-r--r--commands/sleep.c2
-rw-r--r--commands/splash.c2
-rw-r--r--commands/test.c2
-rw-r--r--commands/timeout.c2
-rw-r--r--commands/umount.c2
-rw-r--r--common/command.c12
-rw-r--r--common/env.c6
-rw-r--r--common/hush.c25
-rw-r--r--include/command.h12
-rw-r--r--lib/driver.c2
-rw-r--r--net/ping.c2
39 files changed, 81 insertions, 100 deletions
diff --git a/commands/bootm.c b/commands/bootm.c
index aff6b79990..5f2bec9383 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -317,7 +317,7 @@ void unmap_image(struct image_handle *handle)
#define OPT_OFTREE
#endif
-int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bootm (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
ulong iflag;
int verify = 1;
@@ -420,38 +420,38 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
break;
#ifdef CONFIG_NETBSD
case IH_OS_NETBSD:
- do_bootm_netbsd (cmdtp, flag, argc, argv,
+ do_bootm_netbsd (cmdtp, argc, argv,
addr, len_ptr, verify);
break;
#endif
#ifdef CONFIG_LYNXKDI
case IH_OS_LYNXOS:
- do_bootm_lynxkdi (cmdtp, flag, argc, argv,
+ do_bootm_lynxkdi (cmdtp, argc, argv,
addr, len_ptr, verify);
break;
#endif
#ifdef CONFIG_RTEMS
case IH_OS_RTEMS:
- do_bootm_rtems (cmdtp, flag, argc, argv,
+ do_bootm_rtems (cmdtp, argc, argv,
addr, len_ptr, verify);
break;
#endif
#if (CONFIG_COMMANDS & CFG_CMD_ELF)
case IH_OS_VXWORKS:
- do_bootm_vxworks (cmdtp, flag, argc, argv,
+ do_bootm_vxworks (cmdtp, argc, argv,
addr, len_ptr, verify);
break;
case IH_OS_QNX:
- do_bootm_qnxelf (cmdtp, flag, argc, argv,
+ do_bootm_qnxelf (cmdtp, argc, argv,
addr, len_ptr, verify);
break;
#endif /* CFG_CMD_ELF */
#ifdef CONFIG_ARTOS
case IH_OS_ARTOS:
- do_bootm_artos (cmdtp, flag, argc, argv,
+ do_bootm_artos (cmdtp, argc, argv,
addr, len_ptr, verify);
break;
#endif
@@ -460,7 +460,7 @@ int do_bootm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
SHOW_BOOT_PROGRESS (-9);
#ifdef DEBUG
puts ("\n## Control returned to monitor - resetting...\n");
- do_reset (cmdtp, flag, argc, argv);
+ do_reset (cmdtp, argc, argv);
#endif
err_out:
@@ -491,7 +491,7 @@ U_BOOT_CMD_END
#ifdef CONFIG_NETBSD
static void
-do_bootm_netbsd (cmd_tbl_t *cmdtp, int flag,
+do_bootm_netbsd (cmd_tbl_t *cmdtp,
int argc, char *argv[],
ulong addr,
ulong *len_ptr,
@@ -580,7 +580,7 @@ do_bootm_netbsd (cmd_tbl_t *cmdtp, int flag,
extern uchar (*env_get_char)(int);
static void
-do_bootm_artos (cmd_tbl_t *cmdtp, int flag,
+do_bootm_artos (cmd_tbl_t *cmdtp,
int argc, char *argv[],
ulong addr,
ulong *len_ptr,
@@ -666,7 +666,7 @@ do_bootm_artos (cmd_tbl_t *cmdtp, int flag,
#endif
#ifdef CONFIG_CMD_IMI
-int do_iminfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_iminfo ( cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int arg;
ulong addr;
@@ -782,7 +782,7 @@ void bz_internal_error(int errcode)
#ifdef CONFIG_RTEMS
static void
-do_bootm_rtems (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
+do_bootm_rtems (cmd_tbl_t *cmdtp, int argc, char *argv[],
ulong addr, ulong *len_ptr, int verify)
{
#if 0
@@ -810,7 +810,7 @@ do_bootm_rtems (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
#if (CONFIG_COMMANDS & CFG_CMD_ELF)
static void
-do_bootm_vxworks (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
+do_bootm_vxworks (cmd_tbl_t *cmdtp, int argc, char *argv[],
ulong addr, ulong *len_ptr, int verify)
{
image_header_t *hdr = &header;
@@ -818,11 +818,11 @@ do_bootm_vxworks (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
sprintf(str, "%x", ntohl(hdr->ih_ep)); /* write entry-point into string */
setenv("loadaddr", str);
- do_bootvx(cmdtp, 0, 0, NULL);
+ do_bootvx(cmdtp, 0, NULL);
}
static void
-do_bootm_qnxelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
+do_bootm_qnxelf (cmd_tbl_t *cmdtp, int argc, char *argv[],
ulong addr, ulong *len_ptr, int verify)
{
image_header_t *hdr = &header;
@@ -832,13 +832,13 @@ do_bootm_qnxelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
sprintf(str, "%x", ntohl(hdr->ih_ep)); /* write entry-point into string */
local_args[0] = argv[0];
local_args[1] = str; /* and provide it via the arguments */
- do_bootelf(cmdtp, 0, 2, local_args);
+ do_bootelf(cmdtp, 2, local_args);
}
#endif /* CFG_CMD_ELF */
#ifdef CONFIG_LYNXKDI
static void
-do_bootm_lynxkdi (cmd_tbl_t *cmdtp, int flag,
+do_bootm_lynxkdi (cmd_tbl_t *cmdtp,
int argc, char *argv[],
ulong addr,
ulong *len_ptr,
diff --git a/commands/cat.c b/commands/cat.c
index b126449f6b..7a8facd0e3 100644
--- a/commands/cat.c
+++ b/commands/cat.c
@@ -29,7 +29,7 @@
#include <xfuncs.h>
#include <malloc.h>
-static int do_cat(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_cat(cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int ret;
int fd, i;
diff --git a/commands/cd.c b/commands/cd.c
index 6b4073d2ea..4263d0922e 100644
--- a/commands/cd.c
+++ b/commands/cd.c
@@ -25,7 +25,7 @@
#include <fs.h>
#include <errno.h>
-static int do_cd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_cd (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int ret;
diff --git a/commands/clear.c b/commands/clear.c
index f041d39375..2ddd00d8aa 100644
--- a/commands/clear.c
+++ b/commands/clear.c
@@ -24,7 +24,7 @@
#include <command.h>
#include <readkey.h>
-int do_clear (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_clear (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
printf(ANSI_CLEAR_SCREEN);
diff --git a/commands/cp.c b/commands/cp.c
index a8a6790499..032593df54 100644
--- a/commands/cp.c
+++ b/commands/cp.c
@@ -30,7 +30,7 @@
#define RW_BUF_SIZE (ulong)4096
-int do_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_cp ( cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int r, w, ret = 1;
int src = 0, dst = 0;
diff --git a/commands/crc.c b/commands/crc.c
index c45e193e0b..d36b5d363a 100644
--- a/commands/crc.c
+++ b/commands/crc.c
@@ -8,7 +8,7 @@
#include <malloc.h>
#include <linux/ctype.h>
-int do_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_crc (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
ulong start = 0, size = ~0, total = 0, now;
ulong crc = 0, vcrc = 0;
diff --git a/commands/echo.c b/commands/echo.c
index b49adf37aa..b61930cbf1 100644
--- a/commands/echo.c
+++ b/commands/echo.c
@@ -26,7 +26,7 @@
#include <fcntl.h>
#include <errno.h>
-static int do_echo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_echo (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int i, optind = 1;
int fd = stdout, opt, newline = 1;
diff --git a/commands/edit.c b/commands/edit.c
index 0c5325281a..c251e9ea59 100644
--- a/commands/edit.c
+++ b/commands/edit.c
@@ -372,7 +372,7 @@ static void getwinsize(void) {
}
#endif
-int do_edit(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_edit(cmd_tbl_t * cmdtp, int argc, char *argv[])
{
int lastscrcol;
int i;
diff --git a/commands/environment.c b/commands/environment.c
index c4d3a39150..084c78cc21 100644
--- a/commands/environment.c
+++ b/commands/environment.c
@@ -117,7 +117,7 @@ out:
}
#ifdef __U_BOOT__
-int do_saveenv(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_saveenv(cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int ret, fd;
char *filename, *dirname;
@@ -277,7 +277,7 @@ out:
}
#ifdef __U_BOOT__
-int do_loadenv(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_loadenv(cmd_tbl_t *cmdtp, int argc, char *argv[])
{
char *filename, *dirname;
diff --git a/commands/exec.c b/commands/exec.c
index 3cc9a61bab..b2b0fea238 100644
--- a/commands/exec.c
+++ b/commands/exec.c
@@ -29,7 +29,7 @@
#include <malloc.h>
#include <xfuncs.h>
-static int do_exec(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+static int do_exec(cmd_tbl_t * cmdtp, int argc, char *argv[])
{
int i;
char *script;
diff --git a/commands/flash.c b/commands/flash.c
index 1b0a5cbb5c..110d92a5c0 100644
--- a/commands/flash.c
+++ b/commands/flash.c
@@ -33,7 +33,7 @@
#include <fcntl.h>
#include <linux/stat.h>
-int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_flerase (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int fd;
char *filename = NULL;
@@ -90,7 +90,7 @@ U_BOOT_CMD_START(erase)
U_BOOT_CMD_HELP(cmd_erase_help)
U_BOOT_CMD_END
-int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_protect (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int fd;
char *filename = NULL;
diff --git a/commands/go.c b/commands/go.c
index 6f0179464c..36eca21187 100644
--- a/commands/go.c
+++ b/commands/go.c
@@ -28,7 +28,7 @@
#include <common.h>
#include <command.h>
-int do_go (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_go (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
ulong addr, rc;
int rcode = 0;
diff --git a/commands/loadb.c b/commands/loadb.c
index 8da4b73574..a6f3604336 100644
--- a/commands/loadb.c
+++ b/commands/loadb.c
@@ -63,7 +63,7 @@ int his_pad_count; /* number of pad chars he needs */
char his_pad_char; /* pad chars he needs */
char his_quote; /* quote chars he'll use */
-int do_load_serial_bin (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_load_serial_bin (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
ulong offset = 0;
ulong addr;
diff --git a/commands/loads.c b/commands/loads.c
index f0254bcc20..0d03597585 100644
--- a/commands/loads.c
+++ b/commands/loads.c
@@ -42,7 +42,7 @@ static int save_serial (ulong offset, ulong size);
static int write_record (char *buf);
# endif /* CFG_CMD_SAVES */
-int do_load_serial (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_load_serial (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
ulong offset = 0;
ulong addr;
diff --git a/commands/ls.c b/commands/ls.c
index 3cf7246d09..d9f26a3758 100644
--- a/commands/ls.c
+++ b/commands/ls.c
@@ -95,7 +95,7 @@ out:
return 0;
}
-static int do_ls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_ls (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int ret, opt;
ulong flags = 0;
diff --git a/commands/mem.c b/commands/mem.c
index 74f205ea1b..ebd820d745 100644
--- a/commands/mem.c
+++ b/commands/mem.c
@@ -103,7 +103,7 @@ int memory_display(char *addr, ulong offs, ulong nbytes, int size)
return 0;
}
-static int do_mem_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_mem_md ( cmd_tbl_t *cmdtp, int argc, char *argv[])
{
ulong start = 0, size = 0x100;
int r, now;
@@ -202,7 +202,7 @@ U_BOOT_CMD_START(md)
U_BOOT_CMD_HELP(cmd_md_help)
U_BOOT_CMD_END
-int do_mem_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_mw ( cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int ret = 0;
int fd;
@@ -297,7 +297,7 @@ U_BOOT_CMD_START(mw)
U_BOOT_CMD_END
#if 0
-int do_mem_cmp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_cmp (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
ulong addr1, addr2, count, ngood;
int size;
@@ -376,7 +376,7 @@ U_BOOT_CMD_END
#endif
#if 0
-int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_cp ( cmd_tbl_t *cmdtp, int argc, char *argv[])
{
ulong count, offset, now;
int ret;
diff --git a/commands/meminfo.c b/commands/meminfo.c
index d5eb4671fb..634d661740 100644
--- a/commands/meminfo.c
+++ b/commands/meminfo.c
@@ -23,7 +23,7 @@
#include <command.h>
#include <malloc.h>
-int do_meminfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_meminfo (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
malloc_stats();
diff --git a/commands/memtest.c b/commands/memtest.c
index 0d302acd74..ff7eca6386 100644
--- a/commands/memtest.c
+++ b/commands/memtest.c
@@ -37,7 +37,7 @@
* interrupted by ctrl-c or by a failure of one of the sub-tests.
*/
-int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_mem_mtest (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
vu_long *addr, *start, *end;
ulong val;
diff --git a/commands/mii.c b/commands/mii.c
index eeec7f5e14..bb612d9084 100644
--- a/commands/mii.c
+++ b/commands/mii.c
@@ -47,7 +47,7 @@ uint last_reg;
* mii read {addr} {reg}
* mii write {addr} {reg} {data}
*/
-int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_mii (cmd_tbl_t * cmdtp, int argc, char *argv[])
{
char op;
unsigned char addr, reg;
@@ -427,7 +427,7 @@ static void extract_range(
}
/* ---------------------------------------------------------------- */
-int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_mii (cmd_tbl_t * cmdtp, int argc, char *argv[])
{
char op[2];
unsigned char addrlo, addrhi, reglo, reghi;
diff --git a/commands/mkdir.c b/commands/mkdir.c
index d1f515e47f..d0cbcb5d02 100644
--- a/commands/mkdir.c
+++ b/commands/mkdir.c
@@ -25,7 +25,7 @@
#include <fs.h>
#include <errno.h>
-static int do_mkdir (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_mkdir (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int i = 1;
diff --git a/commands/mount.c b/commands/mount.c
index eecee33419..ec27d10c80 100644
--- a/commands/mount.c
+++ b/commands/mount.c
@@ -25,7 +25,7 @@
#include <fs.h>
#include <errno.h>
-static int do_mount (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_mount (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int ret = 0;
struct mtab_entry *entry = NULL;
diff --git a/commands/net.c b/commands/net.c
index b0fd1a9f48..106ae8f064 100644
--- a/commands/net.c
+++ b/commands/net.c
@@ -88,7 +88,7 @@ static void netboot_update_env (void)
#endif
}
-int do_bootp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_bootp (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
return netboot_common (BOOTP, cmdtp, argc, argv);
}
@@ -100,7 +100,7 @@ U_BOOT_CMD_START(bootp)
U_BOOT_CMD_HELP("[loadAddress] [bootfilename]\n")
U_BOOT_CMD_END
-int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_tftpb (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
return netboot_common (TFTP, cmdtp, argc, argv);
}
@@ -116,7 +116,7 @@ U_BOOT_CMD_START(tftpboot)
U_BOOT_CMD_HELP(cmd_tftpboot_help)
U_BOOT_CMD_END
-int do_rarpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_rarpb (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
return netboot_common (RARP, cmdtp, argc, argv);
}
@@ -129,7 +129,7 @@ U_BOOT_CMD_START(rarpboot)
U_BOOT_CMD_END
#ifdef CONFIG_NET_DHCP
-int do_dhcp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_dhcp (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int size;
@@ -151,7 +151,7 @@ U_BOOT_CMD_END
#endif /* CONFIG_NET_DHCP */
#ifdef CONFIG_NET_NFS
-int do_nfs (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_nfs (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
return netboot_common(NFS, cmdtp, argc, argv);
}
@@ -221,7 +221,7 @@ static void cdp_update_env(void)
}
-int do_cdp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_cdp (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int r;
diff --git a/commands/partition.c b/commands/partition.c
index 42f4870098..199f0c7c50 100644
--- a/commands/partition.c
+++ b/commands/partition.c
@@ -105,7 +105,7 @@ static int mtd_part_do_parse_one(struct partition *part, const char *str,
return 0;
}
-int do_addpart(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_addpart(cmd_tbl_t * cmdtp, int argc, char *argv[])
{
struct partition *part;
struct device_d *dev;
@@ -181,7 +181,7 @@ U_BOOT_CMD_START(addpart)
U_BOOT_CMD_HELP(cmd_addpart_help)
U_BOOT_CMD_END
-int do_delpart(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_delpart(cmd_tbl_t * cmdtp, int argc, char *argv[])
{
struct device_d *dev;
diff --git a/commands/pwd.c b/commands/pwd.c
index 84632244f9..537d54d2a5 100644
--- a/commands/pwd.c
+++ b/commands/pwd.c
@@ -23,7 +23,7 @@
#include <command.h>
#include <fs.h>
-static int do_pwd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_pwd (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
printf("%s\n", getcwd());
return 0;
diff --git a/commands/reginfo.c b/commands/reginfo.c
index 9bcd8be642..506ad92f2c 100644
--- a/commands/reginfo.c
+++ b/commands/reginfo.c
@@ -23,7 +23,7 @@
#include <common.h>
#include <command.h>
-int do_reginfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_reginfo (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
reginfo();
return 0;
diff --git a/commands/reset.c b/commands/reset.c
index a682f8c9d2..e653f5a6a1 100644
--- a/commands/reset.c
+++ b/commands/reset.c
@@ -23,7 +23,7 @@
#include <common.h>
#include <command.h>
-static int cmd_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int cmd_reset (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
reset_cpu(0);
diff --git a/commands/rm.c b/commands/rm.c
index 20ff813c3b..e8bc777eae 100644
--- a/commands/rm.c
+++ b/commands/rm.c
@@ -24,7 +24,7 @@
#include <fs.h>
#include <errno.h>
-static int do_rm (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_rm (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int i = 1;
diff --git a/commands/rmdir.c b/commands/rmdir.c
index cad0862d86..182fa3760c 100644
--- a/commands/rmdir.c
+++ b/commands/rmdir.c
@@ -3,7 +3,7 @@
#include <fs.h>
#include <errno.h>
-static int do_rmdir (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_rmdir (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int i = 1;
diff --git a/commands/sleep.c b/commands/sleep.c
index 675dc0af58..52d146b76f 100644
--- a/commands/sleep.c
+++ b/commands/sleep.c
@@ -24,7 +24,7 @@
#include <command.h>
#include <clock.h>
-int do_sleep (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_sleep (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
uint64_t start;
ulong delay;
diff --git a/commands/splash.c b/commands/splash.c
index a2d14b0802..e3f04001b8 100644
--- a/commands/splash.c
+++ b/commands/splash.c
@@ -39,7 +39,7 @@ int splash_set_fb_data(struct fb_data *d)
return 0;
}
-int do_splash(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_splash(cmd_tbl_t *cmdtp, int argc, char *argv[])
{
ulong addr;
bmp_image_t *bmp;
diff --git a/commands/test.c b/commands/test.c
index 6d59f01057..c9ede75bb1 100644
--- a/commands/test.c
+++ b/commands/test.c
@@ -77,7 +77,7 @@ static int parse_opt(const char *opt)
}
int
-do_test (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_test (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
char **ap;
int left, adv, expr, last_expr, neg, last_cmp, opt, zero;
diff --git a/commands/timeout.c b/commands/timeout.c
index 2f7ce03c4e..5368bc4427 100644
--- a/commands/timeout.c
+++ b/commands/timeout.c
@@ -31,7 +31,7 @@
#define TIMEOUT_ANYKEY (1 << 2)
#define TIMEOUT_SILENT (1 << 3)
-static int do_timeout(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_timeout(cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int timeout = 3, ret = 1;
int flags = 0, opt, countdown;
diff --git a/commands/umount.c b/commands/umount.c
index e56e12eae6..3db3527aac 100644
--- a/commands/umount.c
+++ b/commands/umount.c
@@ -24,7 +24,7 @@
#include <fs.h>
#include <errno.h>
-static int do_umount (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_umount (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int ret = 0;
diff --git a/common/command.c b/common/command.c
index de0f83b9af..8685b02778 100644
--- a/common/command.c
+++ b/common/command.c
@@ -32,7 +32,7 @@
#include <environment.h>
int
-do_version (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_version (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
extern char version_string[];
printf ("\n%s\n", version_string);
@@ -46,7 +46,7 @@ U_BOOT_CMD_START(version)
U_BOOT_CMD_END
int
-do_true (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_true (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
return 0;
}
@@ -58,7 +58,7 @@ U_BOOT_CMD_START(true)
U_BOOT_CMD_END
int
-do_false (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_false (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
return 1;
}
@@ -72,7 +72,7 @@ U_BOOT_CMD_END
#ifdef CONFIG_SHELL_HUSH
int
-do_readline (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_readline (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
char *buf = xzalloc(CONFIG_CBSIZE);
@@ -104,7 +104,7 @@ U_BOOT_CMD_START(readline)
U_BOOT_CMD_END
int
-do_exit (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+do_exit (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int r;
@@ -147,7 +147,7 @@ void u_boot_cmd_usage(cmd_tbl_t *cmdtp)
* Use puts() instead of printf() to avoid printf buffer overflow
* for long help messages
*/
-int do_help (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
+int do_help (cmd_tbl_t * cmdtp, int argc, char *argv[])
{
if (argc == 1) { /*show list of commands */
int cmd_items = &__u_boot_cmd_end -
diff --git a/common/env.c b/common/env.c
index e97354b2c6..1f3852fc41 100644
--- a/common/env.c
+++ b/common/env.c
@@ -218,7 +218,7 @@ int export(const char *varname)
return -1;
}
-int do_printenv (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_printenv (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
struct variable_d *var;
struct env_context *c;
@@ -265,7 +265,7 @@ U_BOOT_CMD_START(printenv)
U_BOOT_CMD_END
#ifdef CONFIG_SIMPLE_PARSER
-int do_setenv ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_setenv ( cmd_tbl_t *cmdtp, int argc, char *argv[])
{
if (argc < 2) {
printf ("Usage:\n%s\n", cmdtp->usage);
@@ -290,7 +290,7 @@ U_BOOT_CMD_END
#endif
-int do_export ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_export ( cmd_tbl_t *cmdtp, int argc, char *argv[])
{
int i = 1;
diff --git a/common/hush.c b/common/hush.c
index ddd797ce39..3323f88dfa 100644
--- a/common/hush.c
+++ b/common/hush.c
@@ -467,7 +467,6 @@ static int run_pipe_real(struct pipe *pi)
{
int i;
int nextin;
- int flag = 0;
struct child_prog *child;
cmd_tbl_t *cmdtp;
char *p;
@@ -535,30 +534,18 @@ static int run_pipe_real(struct pipe *pi)
return last_return_code;
}
if (strchr(child->argv[i], '/')) {
- return execute_script(child->argv[i], child->argc-i,&child->argv[i]);
+ return execute_script(child->argv[i], child->argc-i, &child->argv[i]);
}
if ((path = find_execable(child->argv[i]))) {
printf("path: %s\n", path);
- ret = execute_script(path, child->argc-i,&child->argv[i]);
+ ret = execute_script(path, child->argc-i, &child->argv[i]);
free(path);
return ret;
}
/* Look up command in command table */
if ((cmdtp = find_cmd(child->argv[i]))) {
int rcode;
-#if (CONFIG_COMMANDS & CFG_CMD_BOOTD)
- extern int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
-
- /* avoid "bootd" recursion */
- if (cmdtp->cmd == do_bootd) {
- if (flag & CMD_FLAG_BOOTD) {
- printf ("'bootd' recursion detected\n");
- return -1;
- }
- else
- flag |= CMD_FLAG_BOOTD;
- }
-#endif /* CFG_CMD_BOOTD */
+
/* found - check max args */
if ((child->argc - i) > cmdtp->maxargs) {
printf ("Usage:\n%s\n", cmdtp->usage);
@@ -567,7 +554,7 @@ static int run_pipe_real(struct pipe *pi)
child->argv+=i; /* XXX horrible hack */
/* OK - call function to do the command */
- rcode = cmdtp->cmd(cmdtp, flag,child->argc-i,&child->argv[i]);
+ rcode = cmdtp->cmd(cmdtp, child->argc-i, &child->argv[i]);
child->argv-=i; /* XXX restore hack so free() can work right */
@@ -1486,7 +1473,7 @@ int run_shell(void)
return rcode;
}
-static int do_sh(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_sh(cmd_tbl_t *cmdtp, int argc, char *argv[])
{
if (argc < 2) {
printf ("Usage:\n%s\n", cmdtp->usage);
@@ -1508,7 +1495,7 @@ U_BOOT_CMD_START(sh)
U_BOOT_CMD_HELP(cmd_sh_help)
U_BOOT_CMD_END
-static int do_source(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+static int do_source(cmd_tbl_t *cmdtp, int argc, char *argv[])
{
if (argc < 2) {
printf ("Usage:\n%s\n", cmdtp->usage);
diff --git a/include/command.h b/include/command.h
index e9deb7944e..7a3cb398b3 100644
--- a/include/command.h
+++ b/include/command.h
@@ -41,7 +41,7 @@ struct cmd_tbl_s {
char **aliases;
int maxargs; /* maximum number of arguments */
/* Implementation function */
- int (*cmd)(struct cmd_tbl_s *, int, int, char *[]);
+ int (*cmd)(struct cmd_tbl_s *, int, char *[]);
char *usage; /* Usage message (short) */
#ifdef CONFIG_LONGHELP
char *help; /* Help message (long) */
@@ -78,20 +78,14 @@ extern int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *
*
* All commands use a common argument format:
*
- * void function (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+ * void function (cmd_tbl_t *cmdtp, int argc, char *argv[]);
*/
-typedef void command_t (cmd_tbl_t *, int, int, char *[]);
+typedef void command_t (cmd_tbl_t *, int, char *[]);
#endif /* __ASSEMBLY__ */
/*
- * Command Flags:
- */
-#define CMD_FLAG_REPEAT 0x0001 /* repeat last command */
-#define CMD_FLAG_BOOTD 0x0002 /* command is from bootd */
-
-/*
* Configurable monitor commands definitions have been moved
* to include/cmd_confdefs.h
*/
diff --git a/lib/driver.c b/lib/driver.c
index 0d28b0fe6e..4095699621 100644
--- a/lib/driver.c
+++ b/lib/driver.c
@@ -327,7 +327,7 @@ int dummy_probe(struct device_d *dev)
return 0;
}
-int do_devinfo ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_devinfo ( cmd_tbl_t *cmdtp, int argc, char *argv[])
{
struct device_d *dev = first_device;
struct driver_d *drv = first_driver;
diff --git a/net/ping.c b/net/ping.c
index 21d01376bd..24d99507c7 100644
--- a/net/ping.c
+++ b/net/ping.c
@@ -88,7 +88,7 @@ void PingStart(void)
PingSend();
}
-int do_ping (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+int do_ping (cmd_tbl_t *cmdtp, int argc, char *argv[])
{
if (argc < 2)
return -1;