len = dis_last_len;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if ((flag & CMD_FLAG_REPEAT) == 0) {
/* New command */
int rcode = 0;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
printf ("\nEnter '.' when done\n");
mem_addr = simple_strtoul (argv[1], NULL, 16);
addr = simple_strtoul(argv[1], NULL, 16);
break;
default:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
return (bmp_info(addr));
y = simple_strtoul(argv[3], NULL, 10);
break;
default:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
return (bmp_display(addr, x, y));
if (c)
return c->cmd(cmdtp, flag, argc, argv);
else
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
U_BOOT_CMD(
int rcode = 0;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
addr = simple_strtoul(argv[1], NULL, 16);
}
} else {
/* Unrecognized command */
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
if (images.state >= state) {
printf("Trying to execute a command out of order\n");
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
images.state |= state;
icache_status() ? "ON" : "OFF");
return 0;
default:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
return 0;
}
dcache_status() ? "ON" : "OFF");
return 0;
default:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
return 0;
AT91F_GetMuxStatus () ? "MMC" : "SPI");
return 0;
default:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
return 0;
}
break;
default:
- cmd_usage(cmdtp);
- rcode = 1;
+ rcode = CMD_RET_USAGE;
}
/* switch back to original I2C bus */
/* Validate arguments */
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/* Get a DCR */
dcrn = (unsigned short) simple_strtoul (argv[1], NULL, 16);
/* Validate arguments */
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/* Set a DCR */
dcrn = (unsigned short) simple_strtoul (argv[1], NULL, 16);
/* Validate arguments */
if (argc < 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/* Find out whether ther is '.' (dot) symbol in the first parameter. */
strncpy (buf, argv[1], sizeof(buf)-1);
/* Validate arguments */
if (argc < 4)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/* Find out whether ther is '.' (dot) symbol in the first parameter. */
strncpy (buf, argv[1], sizeof(buf)-1);
}
usage:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
U_BOOT_CMD(
}
}
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
#endif
int part_length;
if (argc < 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
dev = (int)simple_strtoul (argv[2], &ep, 16);
dev_desc = get_dev(argv[1],dev);
break;
default:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
if (!filename) {
boot_drive=simple_strtoul(argv[2], NULL, 10);
break;
default:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
/* setup FDC and scan for drives */
if(fdc_setup(boot_drive,pCMD,pFG)==FALSE) {
name = argv [2];
break;
default:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
/* Init physical layer */
int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
{
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/*
* Set the address of the fdt
int err;
if (argc < 4)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/*
* Set the address and length of the fdt.
* Parameters: Node path, new node to be appended to the path.
*/
if (argc < 4)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
pathp = argv[2];
nodep = argv[3];
* Parameters: Node path, property, optional value.
*/
if (argc < 4)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
pathp = argv[2];
prop = argv[3];
}
} else {
/* Unrecognized command */
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
}
#ifdef CONFIG_OF_BOARD_SETUP
unsigned long initrd_start = 0, initrd_end = 0;
if ((argc != 2) && (argc != 4))
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if (argc == 4) {
initrd_start = simple_strtoul(argv[2], NULL, 16);
}
else {
/* Unrecognized command */
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
return 0;
ulong addr = 0UL;
if (argc > 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if (argc == 2)
addr = simple_strtoul(argv[1], NULL, 16);
int rcode = 0;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if (strcmp(argv[1], "all") == 0) {
for (bank=1; bank<=CONFIG_SYS_MAX_FLASH_BANKS; ++bank) {
#endif
if (argc != 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if (strcmp(argv[1], "bank") == 0) {
bank = simple_strtoul(argv[2], NULL, 16);
}
if (addr_first >= addr_last)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
rcode = flash_sect_erase(addr_first, addr_last);
return rcode;
#endif
if (argc < 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
#if !defined(CONFIG_SYS_NO_FLASH) || defined(CONFIG_HAS_DATAFLASH)
if (strcmp(argv[1], "off") == 0)
else if (strcmp(argv[1], "on") == 0)
p = 1;
else
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
#endif
#ifdef CONFIG_HAS_DATAFLASH
#endif
if (argc != 4)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if (strcmp(argv[2], "bank") == 0) {
bank = simple_strtoul(argv[3], NULL, 16);
}
if (addr_first >= addr_last)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
rcode = flash_sect_protect (p, addr_first, addr_last);
#endif /* CONFIG_SYS_NO_FLASH */
switch (op) {
case FPGA_NONE:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
case FPGA_INFO:
rc = fpga_info (dev);
default:
printf ("Unknown operation\n");
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
return (rc);
}
if (argc != 3)
show_usage:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
str_cmd = argv[1];
str_gpio = argv[2];
u_char *memaddr;
if (argc != 5)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/*
* I2C chip address
devaddr = simple_strtoul(argv[2], NULL, 16);
alen = get_alen(argv[2]);
if (alen > 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/*
* Length is the number of objects, not number of bytes.
length = i2c_dp_last_length;
if (argc < 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if ((flag & CMD_FLAG_REPEAT) == 0) {
/*
addr = simple_strtoul(argv[2], NULL, 16);
alen = get_alen(argv[2]);
if (alen > 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/*
* If another parameter, it is the length to display.
int count;
if ((argc < 4) || (argc > 5))
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/*
* Chip is always specified.
addr = simple_strtoul(argv[2], NULL, 16);
alen = get_alen(argv[2]);
if (alen > 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/*
* Value to write is always specified.
ulong err;
if (argc < 4)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/*
* Chip is always specified.
addr = simple_strtoul(argv[2], NULL, 16);
alen = get_alen(argv[2]);
if (alen > 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/*
* Count is always specified
int nbytes;
if (argc != 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
#ifdef CONFIG_BOOT_RETRY_TIME
reset_cmd_timeout(); /* got a good command to get here */
addr = simple_strtoul(argv[2], NULL, 16);
alen = get_alen(argv[2]);
if (alen > 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
/*
int delay;
if (argc < 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/*
* Chip is always specified.
addr = simple_strtoul(argv[2], NULL, 16);
alen = get_alen(argv[2]);
if (alen > 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/*
* Length is the number of objects, not number of bytes.
};
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/*
* Chip is always specified.
cmd_tbl_t *c;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/* Strip off leading 'i2c' command argument */
argc--;
c = find_cmd_tbl(argv[0], &cmd_i2c_sub[0], ARRAY_SIZE(cmd_i2c_sub));
if (c)
- return c->cmd(cmdtp, flag, argc, argv);
+ return c->cmd(cmdtp, flag, argc, argv);
else
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
/***************************************************/
switch (argc) {
case 0:
case 1:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
case 2:
if (strncmp(argv[1], "res", 3) == 0) {
puts("\nReset IDE"
}
return rcode;
}
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
case 3:
if (strncmp(argv[1], "dev", 3) == 0) {
int dev = (int) simple_strtoul(argv[2], NULL, 10);
return rcode;
}
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
default:
/* at least 4 args */
else
return 1;
} else {
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
return rcode;
break;
default:
show_boot_progress(-42);
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
show_boot_progress(42);
{
if (argc != 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/* on */
if (strncmp(argv[1], "on", 2) == 0)
/* Validate arguments */
if ((argc != 4))
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/* Check for a data width specification.
* Defaults to long (4) if no specification.
/* Validate arguments */
if ((argc != 3)) {
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
cmd = get_led_cmd(argv[2]);
if (cmd < 0) {
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
for (i = 0; led_commands[i].string; i++) {
/* If we ran out of matches, print Usage */
if (!match) {
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
return 0;
if (strcmp(argv[1], "on") == 0)
hwflow_onoff(1);
else
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
printf("RTS/CTS hardware flow control: %s\n", hwflow_onoff(0) ? "on" : "off");
return 0;
}
return 0;
}
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
default:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
}
u8 output[16];
if (argc < 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
addr = simple_strtoul(argv[1], NULL, 16);
len = simple_strtoul(argv[2], NULL, 16);
struct mii_dev *bus;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/*
* We use the last specified parameters, unless new ones are
length = dp_last_length;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if ((flag & CMD_FLAG_REPEAT) == 0) {
/* New command specified. Check for a size specification.
int size;
if ((argc < 3) || (argc > 4))
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/* Check for size specification.
*/
ulong count;
if (argc < 4)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
count = simple_strtoul(argv[3], NULL, 10);
ulong count;
if (argc < 4)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
count = simple_strtoul(argv[3], NULL, 10);
int rcode = 0;
if (argc != 4)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/* Check for size specification.
*/
int size;
if (argc != 4)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/* Check for size specification.
*/
volatile u_char *cp;
if (argc < 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/* Check for a size spefication.
* Defaults to long if no or incorrect specification.
volatile u_char *cp;
if (argc < 4)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/* Check for a size spefication.
* Defaults to long if no or incorrect specification.
int nbytes, size;
if (argc != 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
#ifdef CONFIG_BOOT_RETRY_TIME
reset_cmd_timeout(); /* got a good command to get here */
ulong *ptr;
if (argc < 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
addr = simple_strtoul (argv[1], NULL, 16);
addr += base_address;
if (argc < 3) {
usage:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
av = argv + 1;
unsigned int blocking;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
fslnum = (unsigned int)simple_strtoul (argv[1], NULL, 16);
blocking = (unsigned int)simple_strtoul (argv[2], NULL, 16);
if (fslnum < 0 || fslnum >= XILINX_FSL_NUMBER) {
puts ("Bad number of FSL\n");
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
switch (fslnum) {
unsigned int blocking;
if (argc < 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
fslnum = (unsigned int)simple_strtoul (argv[1], NULL, 16);
num = (unsigned int)simple_strtoul (argv[2], NULL, 16);
blocking = (unsigned int)simple_strtoul (argv[3], NULL, 16);
if (fslnum < 0 || fslnum >= XILINX_FSL_NUMBER)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
switch (fslnum) {
#if (XILINX_FSL_NUMBER > 0)
unsigned int val = 0;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
reg = (unsigned int)simple_strtoul (argv[1], NULL, 16);
val = (unsigned int)simple_strtoul (argv[2], NULL, 16);
return 1;
break;
default:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
return 0;
}
const char *devname;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
#if defined(CONFIG_MII_INIT)
mii_init ();
else
miiphy_set_current_dev (argv[2]);
} else {
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
/*
ulong delay;
if (argc != 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
delay = simple_strtoul(argv[1], NULL, 10) * CONFIG_SYS_HZ;
int dev;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if (strcmp(argv[1], "init") == 0) {
if (argc == 2) {
} else if (argc == 3) {
dev = (int)simple_strtoul(argv[2], NULL, 10);
} else {
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
if (mmc_legacy_init(dev) != 0) {
#endif
curr_device = dev;
} else {
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
printf("mmc%d is current device\n", curr_device);
} else {
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
return 0;
enum mmc_state state;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if (curr_device < 0) {
if (get_mmc_num() > 0)
return 1;
}
} else
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
mmc = find_mmc_device(dev);
if (!mmc) {
return (n == cnt) ? 0 : 1;
}
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
U_BOOT_CMD(
return 0;
usage:
- cmd_usage(cmdtp);
- return 1;
+ return CMD_RET_USAGE;
}
U_BOOT_CMD(
unsigned long cpuid;
if (argc < 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
cpuid = simple_strtoul(argv[1], NULL, 10);
if (!is_core_valid(cpuid)) {
else if (strncmp(argv[2], "disable", 7) == 0)
return cpu_disable(cpuid);
else
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
return 0;
}
/* 4 or greater, make sure its release */
if (strncmp(argv[2], "release", 7) != 0)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if (cpu_release(cpuid, argc - 3, argv + 3))
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
return 0;
}
return spread_partitions();
#endif /* CONFIG_CMD_MTDPARTS_SPREAD */
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
/***************************************************/
return ret;
usage:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
#endif
#endif
usage:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
U_BOOT_CMD(
usage:
#endif
show_boot_progress(-53);
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
show_boot_progress(53);
#endif
default:
show_boot_progress (-80);
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
show_boot_progress (80);
NetPingIP = string_to_ip(argv[1]);
if (NetPingIP == 0)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if (NetLoop(PING) < 0) {
printf("ping failed; host %s is not alive\n", argv[1]);
int do_dns(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
if (argc == 1)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/*
* We should check for a valid hostname:
int rcode = 1, arg = 1, idx;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
memset(matched, 0, env_htab.size / 8);
int do_env_set(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
return _do_env_set(flag, argc, argv);
}
/* Check the syntax */
switch (argc) {
case 1:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
case 2: /* env_ask envname */
sprintf(message, "Please enter '%s':", argv[1]);
char *init_val;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/* Set read buffer to initial value or empty sting */
init_val = getenv(argv[1]);
int argc, char * const argv[])
{
if (argc != 2 || strcmp(argv[1], "-f") != 0)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
set_default_env("## Resetting to default environment\n");
return 0;
sep = '\n';
break;
default:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
}
NXTARG: ;
}
if (argc < 1)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
addr = (char *)simple_strtoul(argv[0], NULL, 16);
del = 1;
break;
default:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
}
}
if (argc < 1)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if (!fmt)
printf("## Warning: defaulting to text format\n");
cmd_tbl_t *cp;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/* drop initial "env" arg */
argc--;
if (cp)
return cp->cmd(cmdtp, flag, argc, argv);
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
U_BOOT_CMD(
size_t retlen = 0;
if (argc < 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
s = strchr(argv[0], '.');
if ((s != NULL) && (!strcmp(s, ".oob")))
size_t retlen = 0;
if (argc < 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if (strncmp(argv[0] + 6, "yaffs", 5) == 0)
withoob = 1;
char *s;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
s = strchr(argv[0], '.');
ofs = (int)simple_strtoul(argv[1], NULL, 16);
argv += 2;
if (argc <= 0)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
while (argc > 0) {
addr = simple_strtoul(*argv, NULL, 16);
cmd_tbl_t *c;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
mtd = &onenand_mtd;
if (c)
return c->cmd(cmdtp, flag, argc, argv);
else
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
U_BOOT_CMD(
if (argc < 4) {
usage:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
prompt_user = false;
return 1;
usage:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
/***************************************************/
uint value = out_last_value;
if (argc != 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if ((flag & CMD_FLAG_REPEAT) == 0) {
/*
uint size = in_last_size;
if (argc != 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if ((flag & CMD_FLAG_REPEAT) == 0) {
/*
int err;
if (argc != 1)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
pxefile_addr_str = from_env("pxefile_addr_r");
} else if (argc == 2) {
pxefile_addr_str = argv[1];
} else {
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
if (strict_strtoul(pxefile_addr_str, 16, &pxefile_addr_r) < 0) {
cmd_tbl_t *cp;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/* drop initial "pxe" arg */
argc--;
if (cp)
return cp->cmd(cmdtp, flag, argc, argv);
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
U_BOOT_CMD(
int part_length;
if (argc < 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
dev = (int)simple_strtoul (argv[2], &ep, 16);
dev_desc = get_dev(argv[1],dev);
break;
default:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
if (!filename) {
switch (argc) {
case 0:
case 1:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
case 2:
if (strncmp(argv[1],"inf", 3) == 0) {
int i;
}
return rc;
}
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
case 3:
if (strncmp(argv[1], "dev", 3) == 0) {
int dev = (int)simple_strtoul(argv[2], NULL, 10);
}
return rc;
}
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
default: /* at least 4 args */
if (strcmp(argv[1], "read") == 0) {
n, (n == cnt) ? "OK" : "ERROR");
return (n == cnt) ? 0 : 1;
} else {
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
return rc;
boot_device = argv[2];
break;
default:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
if (!boot_device) {
int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
switch (argc) {
- case 0:
- case 1: return cmd_usage(cmdtp);
+ case 0:
+ case 1:
+ return CMD_RET_USAGE;
- case 2:
+ case 2:
if (strncmp(argv[1],"res",3) == 0) {
printf("\nReset SCSI\n");
scsi_bus_reset();
printf("\nno SCSI devices available\n");
return 1;
}
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
case 3:
if (strncmp(argv[1],"dev",3) == 0) {
int dev = (int)simple_strtoul(argv[2], NULL, 10);
}
return 1;
}
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
default:
/* at least 4 args */
if (strcmp(argv[1],"read") == 0) {
return 0;
}
} /* switch */
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
/****************************************************************************************
/* Validate arguments */
if ((argc != 5) || (strlen(argv[3]) != 1))
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
w = cmd_get_data_size(argv[0], 4);
return ret;
usage:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
U_BOOT_CMD(
u8 output[20];
if (argc < 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
addr = simple_strtoul(argv[1], NULL, 16);
len = simple_strtoul(argv[2], NULL, 16);
int do_strings(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
if (argc == 1)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if ((flag & CMD_FLAG_REPEAT) == 0) {
start_addr = (char *)simple_strtoul(argv[1], NULL, 16);
return 1;
}
if (argc > cmdtp->maxargs)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
/*
* TODO(clchiou): get_timer_masked() is only defined in certain ARM
int retval = 0;
if (argc == 1)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
retval = run_command_and_time_it(0, argc - 1, argv + 1, &cycles);
report_time(cycles);
int err = 0;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if (mtdparts_init() != 0) {
printf("Error initializing mtdparts!\n");
}
if (argc < 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
#ifdef CONFIG_CMD_UBIFS
/*
int ret;
if (argc != 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
vol_name = argv[1];
debug("Using volume %s\n", vol_name);
int do_ubifs_umount(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
if (argc != 1)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if (ubifs_initialized == 0) {
printf("No UBIFS volume mounted!\n");
}
if (argc < 3)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
addr = simple_strtoul(argv[1], &endp, 16);
if (endp == argv[1])
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
filename = argv[2];
if (argc == 4) {
size = simple_strtoul(argv[3], &endp, 16);
if (endp == argv[3])
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
debug("Loading file '%s' to address 0x%08x (size %d)\n", filename, addr, size);
dst = simple_strtoul(argv[2], NULL, 16);
break;
default:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
if (gunzip((void *) dst, dst_len, (void *) src, &src_len) != 0)
boot_device = argv[2];
break;
default:
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
if (!boot_device) {
#endif
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
if ((strncmp(argv[1], "reset", 5) == 0) ||
(strncmp(argv[1], "start", 5) == 0)) {
return 0;
}
#endif /* CONFIG_USB_STORAGE */
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
}
#ifdef CONFIG_USB_STORAGE
int i;
if (argc < 2)
- return cmd_usage(cmdtp);
+ return CMD_RET_USAGE;
for (i=1; i<argc; ++i) {
char *arg;