Commit 62c3ae7c authored by Peter Tyser's avatar Peter Tyser Committed by Wolfgang Denk
Browse files

Standardize command usage messages with cmd_usage()


Signed-off-by: default avatarPeter Tyser <ptyser@xes-inc.com>
parent 84cde2bb
......@@ -144,7 +144,7 @@ int do_vcimage (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
rcode = 0;
break;
default:
printf ("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
rcode = 1;
break;
}
......
......@@ -79,7 +79,7 @@ int ads5121diu_init_show_bmp(cmd_tbl_t *cmdtp,
unsigned int addr;
if (argc < 2) {
printf("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
......
......@@ -45,7 +45,7 @@ static int do_bootstrap(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
int cpu_freq;
if (argc < 3) {
printf("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
......
......@@ -99,7 +99,7 @@ static int do_bootstrap(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
extern char console_buffer[];
if (argc < 2) {
printf("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
......
......@@ -43,7 +43,7 @@ static int do_bootstrap(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
char pcixClock[4];
if (argc < 3) {
printf ("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
......
......@@ -183,7 +183,7 @@ do_pll_alter (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
char c = '\0';
pll_freq_t pll_freq;
if (argc < 2) {
printf("Usage: \n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
goto ret;
}
......@@ -222,8 +222,8 @@ do_pll_alter (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
goto ret;
default:
printf("Invalid options"
"\n\nUsage: \n%s\n", cmdtp->usage);
printf("Invalid options\n\n");
cmd_usage(cmdtp);
goto ret;
}
......
......@@ -319,7 +319,7 @@ int do_l2cache( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] )
l2cache_status() ? "ON" : "OFF");
return 0;
default:
printf ("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
......
......@@ -183,7 +183,7 @@ do_pll_alter (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
char c = '\0';
pll_freq_t pll_freq;
if (argc < 2) {
printf("Usage: \n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
goto ret;
}
......@@ -222,8 +222,8 @@ do_pll_alter (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
goto ret;
default:
printf("Invalid options"
"\n\nUsage: \n%s\n", cmdtp->usage);
printf("Invalid options\n\n");
cmd_usage(cmdtp);
goto ret;
}
......
......@@ -128,7 +128,7 @@ static int do_bootstrap(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
extern char console_buffer[];
if (argc < 2) {
printf("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
......
......@@ -59,7 +59,7 @@ static int setBootStrapClock(cmd_tbl_t *cmdtp, int incrflag, int flag,
char pcixClock[4];
if (argc < 3) {
printf ("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
......
......@@ -292,7 +292,7 @@ int barcobcd_boot_image (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
#if 0
if (argc > 1) {
printf ("Usage:\n (%d) %s\n", argc, cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
#endif
......
......@@ -346,7 +346,7 @@ int do_esdbmp(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
char *str;
#endif
if (argc != 2) {
printf ("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
......
......@@ -220,7 +220,7 @@ int do_pci9054 (cmd_tbl_t * cmdtp, int flag, int argc,
return 0;
}
printf ("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
......
......@@ -328,7 +328,7 @@ int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
prog_eeprom();
break;
default:
printf("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
break;
}
......@@ -362,7 +362,7 @@ int do_mac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
break;
case 'h': /* help */
default:
printf("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
break;
}
......
......@@ -116,7 +116,7 @@ int mpc8610diu_init_show_bmp(cmd_tbl_t *cmdtp,
unsigned int addr;
if (argc < 2) {
printf ("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
......
......@@ -272,7 +272,7 @@ do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
break;
}
printf ("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
U_BOOT_CMD(
......@@ -324,7 +324,7 @@ do_eecl (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
/* fall through ... */
default:
printf ("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
......
......@@ -846,7 +846,7 @@ int do_pic (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
default:
break;
}
printf ("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
U_BOOT_CMD(
......@@ -976,7 +976,7 @@ int do_lsb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
default:
break;
}
printf ("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
......
......@@ -467,7 +467,7 @@ void hw_watchdog_reset(void)
int do_eeprom_wp(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
if (argc < 2) {
printf("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
......@@ -476,7 +476,7 @@ int do_eeprom_wp(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
} else if ((strcmp(argv[1], "off") == 0)) {
gpio_write_bit(CONFIG_SYS_GPIO_EEPROM_EXT_WP, 0);
} else {
printf("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
......
......@@ -559,7 +559,7 @@ int do_mplcommon(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
return 0;
}
#endif
printf("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
......
......@@ -230,7 +230,7 @@ int do_wd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
default:
break;
}
printf ("Usage:\n%s\n", cmdtp->usage);
cmd_usage(cmdtp);
return 1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment