Standardize command usage messages with cmd_usage()
authorPeter Tyser <ptyser@xes-inc.com>
Wed, 28 Jan 2009 00:03:10 +0000 (18:03 -0600)
committerWolfgang Denk <wd@denx.de>
Wed, 28 Jan 2009 07:43:45 +0000 (08:43 +0100)
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
89 files changed:
board/BuS/EB+MCF-EV123/EB+MCF-EV123.c
board/ads5121/ads5121_diu.c
board/amcc/acadia/cmd_acadia.c
board/amcc/canyonlands/bootstrap.c
board/amcc/katmai/cmd_katmai.c
board/amcc/kilauea/cmd_pll.c
board/amcc/luan/luan.c
board/amcc/makalu/cmd_pll.c
board/amcc/sequoia/cmd_sequoia.c
board/amcc/yucca/cmd_yucca.c
board/barco/barco.c
board/esd/common/lcd.c
board/esd/dasa_sim/cmd_dasa_sim.c
board/freescale/common/sys_eeprom.c
board/freescale/mpc8610hpcd/mpc8610hpcd_diu.c
board/hymod/bsp.c
board/lwmon/lwmon.c
board/lwmon5/lwmon5.c
board/mpl/common/common_util.c
board/pcippc2/pcippc2.c
board/pcs440ep/pcs440ep.c
board/pn62/cmd_pn62.c
board/prodrive/pdnb3/pdnb3.c
board/renesas/sh7785lcr/rtl8169_mac.c
board/renesas/sh7785lcr/selfcheck.c
board/siemens/common/fpga.c
board/siemens/pcu_e/pcu_e.c
board/ssv/common/cmd_sled.c
board/ssv/common/wd_pio.c
board/tqc/tqm5200/cmd_stk52xx.c
board/trab/cmd_trab.c
board/trizepsiv/eeprom.c
board/w7o/cmd_vpd.c
common/cmd_bedbug.c
common/cmd_bmp.c
common/cmd_boot.c
common/cmd_bootm.c
common/cmd_cache.c
common/cmd_date.c
common/cmd_dcr.c
common/cmd_df.c
common/cmd_doc.c
common/cmd_eeprom.c
common/cmd_ext2.c
common/cmd_fdc.c
common/cmd_fdos.c
common/cmd_fdt.c
common/cmd_flash.c
common/cmd_fpga.c
common/cmd_i2c.c
common/cmd_ide.c
common/cmd_irq.c
common/cmd_itest.c
common/cmd_jffs2.c
common/cmd_load.c
common/cmd_log.c
common/cmd_mem.c
common/cmd_mfsl.c
common/cmd_mii.c
common/cmd_misc.c
common/cmd_mp.c
common/cmd_nand.c
common/cmd_net.c
common/cmd_nvedit.c
common/cmd_onenand.c
common/cmd_otp.c
common/cmd_pci.c
common/cmd_portio.c
common/cmd_reiser.c
common/cmd_sata.c
common/cmd_scsi.c
common/cmd_setexpr.c
common/cmd_sf.c
common/cmd_strings.c
common/cmd_ubi.c
common/cmd_usb.c
common/cmd_vfd.c
common/command.c
common/hush.c
common/main.c
cpu/mpc8260/bedbug_603e.c
cpu/mpc83xx/ecc.c
cpu/mpc8xx/bedbug_860.c
cpu/ppc4xx/bedbug_405.c
drivers/gpio/pca953x.c
drivers/misc/ds4510.c
drivers/qe/qe.c
include/command.h
tools/updater/cmd_flash.c

index d509a8fdbc3c1e7398cb03595800e2c41597d052..753d85b1b205767044a690f20e0a8e597744c3a5 100644 (file)
@@ -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;
        }
index 896900b2ee5f4cefbefb0d32a25a00367b2899b7..11e2be781f44859efe2b8770100b7edaf1881ab2 100644 (file)
@@ -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;
        }
 
index 052cf6184a9f1c46db1d4befe2f6a510de4adc4e..9fc03f106cbc649f7e07c02e00ae146334c0ce37 100644 (file)
@@ -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;
        }
 
index b1f4a213d971a943bb8f07a7f267b301ab28ecd6..35284d179422f5459c5b570d552ab646652ccbbd 100644 (file)
@@ -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;
        }
 
index ba71bd55c0818538f11821152af258eaa2024602..d362655663967c5d87e4bd6f75780233ea070d6e 100644 (file)
@@ -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;
        }
 
index 0f571fefed748d34b914d8fde38d22833426e18d..3b49e5b37ad989253ebfc2714abd43ecfcf68ecc 100644 (file)
@@ -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;
        }
 
index de3e3d8b925d36a8cfaa8b1e53a6ce1e0ea3968e..e1357f404b1306d2a2d6471abe4da7a470b766c3 100644 (file)
@@ -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;
        }
 
index 0f571fefed748d34b914d8fde38d22833426e18d..3b49e5b37ad989253ebfc2714abd43ecfcf68ecc 100644 (file)
@@ -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;
        }
 
index 3402f84a3e62565f217544318f9c26e93950a8bc..c840748d43ddf84696d23933c7d623bdd30bd1e8 100644 (file)
@@ -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;
        }
 
index d9698602b1a5a59a3fbe42b8a0fc3f4cad7e8516..5198317dd2519bcd9a0f196bc2fd8a912e9f6cba 100644 (file)
@@ -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;
        }
 
index ed3557219506741f229cbe00784ceabebfae3f7d..e3abca4cffd11fae0ac156af59eb9ddc8d0ef672 100644 (file)
@@ -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
index 1eea59ecb12e9dd197a1ccaecf7d6de2a1247d06..1db8d9058a9310c0d5d4481d2303ea1213602f2f 100644 (file)
@@ -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;
        }
 
index 36dd58c3e4b47f01bbfd5eb220fe59651c1f4fa0..97a39c9d7a5cb0b845c9a7c5b526d20a70d66c54 100644 (file)
@@ -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;
 
 }
index eb58c7fd57c0ab3a78d399756731bbe435fee59e..988cb94aa137f57202778fa07d2b0b5f97387fe0 100644 (file)
@@ -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;
        }
 
index 08eaf10dd3ddd7a674a2ddc79298cf90476c52f1..2320c0f138725a9f9deb3b6de62454eef7748161 100644 (file)
@@ -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;
        }
 
index 1848bb3fcaa643340867f09e3416e13cbe11d458..54b3b86c6dbb7c73b4af93529418e3b2dafdcbd8 100644 (file)
@@ -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;
        }
 
index 878752c66914b02fcb811ed5ee014032005a2878..257f1cd2497a57519d0aaae245cd8f3cbf476e11 100644 (file)
@@ -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;
 }
 
index aa62f37900a8ab73c22714fdbebd6728041e7b7a..adecad0f8d88a9d52a4d9e49c31067c7484a8b51 100644 (file)
@@ -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;
        }
 
index 877a2d0044f6dbb6c4eecf86dda1229e0da0ec3b..d16939120ae0d4171007e756cd6e8fb482e4c855 100644 (file)
@@ -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;
 }
 
index a3dbdc846e037e34202a18b8fce53bdca90b5f52..c706ca588d76d556713992d509f273110d053255 100644 (file)
@@ -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;
 }
 
index 73a7a08e27894090e114ebc87d561df73959b97b..01ceecebbb8bfeb843a8e272057ce5f9f2fd32ab 100644 (file)
@@ -780,7 +780,7 @@ int do_sha1 (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
        if (argc < 2) {
   usage:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index 3f53e4b7cad90a39472d42b88784aa3fa3695652..bb98fcfa00c78fea1f42843d4cbb9cdcd88c10b8 100644 (file)
@@ -41,7 +41,7 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
     unsigned int number, function;
 
     if (argc != 3) {
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
     }
     number = simple_strtoul(argv[1], NULL, 10);
@@ -83,7 +83,7 @@ int do_loadpci (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        addr = simple_strtoul(argv[1], NULL, 16);
        break;
     default:
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
     }
 
index 3773ba181848e214040f60d61d2ec875f6869a93..9b87f6a8a95155ba9023b06c0d337322279823cd 100644 (file)
@@ -216,7 +216,7 @@ int do_fpga(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        ulong addr;
 
        if (argc < 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index bf0ba145d20ab3c051ff6f5e5094d1ecc45b723d..8b04453adb2616a0254de71792f2944f3080a1c8 100644 (file)
@@ -305,7 +305,7 @@ int do_set_mac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        char *s, *e;
 
        if (argc != 2) {
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -331,7 +331,7 @@ U_BOOT_CMD(
 int do_print_mac(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
        if (argc != 1) {
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index ce0620f6878d8a91e52672fe933fa80b2c1a9d2c..22079fbcc0d2fd12ce7615c059bbd8901580093e 100644 (file)
@@ -113,7 +113,7 @@ int do_hw_test(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        char *cmd;
 
        if (argc != 2) {
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -150,7 +150,7 @@ int do_hw_test(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                test_net();
                break;
        default:
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index ac0022e7b130980261e1c288e020d75cf2df92fb..63aa179d2dbfecc179cf60d2320dab1335011d52 100644 (file)
@@ -286,7 +286,7 @@ int do_fpga (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
     return 0;
 
  failure:
-    printf ("Usage:\n%s\n", cmdtp->usage);
+    cmd_usage(cmdtp);
     return 1;
 }
 
index a60c825b2b5fb693a197016eb4a9d24a4b8e4cc2..25cf2bb2971c93ded1563d664ac16410390588a0 100644 (file)
@@ -399,7 +399,7 @@ int do_puma (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        default:
                break;
        }
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
 }
 
index 2208580faec53eacd45438a2647d7f7707b6df7d..cb796982b9f29092c6e5f924b18ae914cfec006d 100644 (file)
@@ -133,7 +133,7 @@ int do_sled (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        default:
                break;
        }
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
 }
 
index 9945c5987e1cc434c59492042c0630020cb1a123..8823ed12f436355d87a35522addc441d78b81574 100644 (file)
@@ -145,7 +145,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;
 }
 
index 5483fcaf7a3886cb6c2659558492249445cae739..6ef7fbe01329deb6d87079850ab8d1f961fbdef9 100644 (file)
@@ -327,7 +327,7 @@ static int cmd_sound(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        switch (argc) {
        case 0:
        case 1:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        case 2:
                if (strncmp(argv[1],"saw",3) == 0) {
@@ -342,7 +342,7 @@ static int cmd_sound(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        return rcode;
                }
 
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        case 3:
                if (strncmp(argv[1],"saw",3) == 0) {
@@ -358,7 +358,7 @@ static int cmd_sound(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                                                LEFT_RIGHT);
                        return rcode;
                }
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        case 4:
                if (strncmp(argv[1],"saw",3) == 0) {
@@ -382,7 +382,7 @@ static int cmd_sound(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        pcm1772_write_reg((uchar)reg, (uchar)val);
                        return 0;
                }
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        case 5:
                if (strncmp(argv[1],"saw",3) == 0) {
@@ -412,7 +412,7 @@ static int cmd_sound(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                                                channel);
                        return rcode;
                }
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
        printf ("Usage:\nsound cmd [arg1] [arg2] ...\n");
@@ -513,7 +513,7 @@ static int cmd_beep(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        channel = LEFT_RIGHT;
                break;
        default:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index daa6aeefc73f5a6b0bc8d3b974ea8fca07416e49..5020d609f45ff6ac421eff2d8b9a66f81b74f296 100644 (file)
@@ -168,7 +168,7 @@ int do_burn_in (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        int cycle_status;
 
        if (argc > 1) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -271,7 +271,7 @@ int do_dip (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        int i, dip;
 
        if (argc > 1) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -304,7 +304,7 @@ int do_vcc5v (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        int vcc5v;
 
        if (argc > 1) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -332,7 +332,7 @@ int do_contact_temp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        int contact_temp;
 
        if (argc > 1) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -355,7 +355,7 @@ U_BOOT_CMD(
 int do_burn_in_status (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
        if (argc > 1) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -851,7 +851,7 @@ int do_temp_log (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 #endif
 
        if (argc > 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index 7a2b90585b886a1947aa28a4f7e1df36639b8990..e11519aa2f8763bf00d09925231e235737e7afb1 100644 (file)
@@ -43,7 +43,7 @@ static int do_write_dm9000_eeprom ( cmd_tbl_t *cmdtp, int flag, int argc, char *
        int offset,value;
 
        if (argc < 4) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -51,7 +51,7 @@ static int do_write_dm9000_eeprom ( cmd_tbl_t *cmdtp, int flag, int argc, char *
        value=simple_strtoul(argv[3],NULL,16);
        if (offset > 0x40) {
                printf("Wrong offset : 0x%x\n",offset);
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
        write_srom_word(offset, value);
@@ -60,7 +60,7 @@ static int do_write_dm9000_eeprom ( cmd_tbl_t *cmdtp, int flag, int argc, char *
 
 int do_dm9000_eeprom ( 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;
        }
 
@@ -69,7 +69,7 @@ int do_dm9000_eeprom ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) {
        } else if (strcmp (argv[1],"write") == 0) {
                return (do_write_dm9000_eeprom(cmdtp,flag,argc,argv));
        } else {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 }
index 310fde052f9c204bfc0583be67d0e977f0b48841..52025213d7fdce099358e048d25ef8588ca1ea1d 100644 (file)
@@ -39,7 +39,7 @@ int do_vpd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 
        /* Validate usage */
        if (argc > 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index e6277c940860b8b301a3bd8cc683e2737b73442b..1dda1933447e99ee52a63ce9a1005c8c9e854be7 100644 (file)
@@ -85,7 +85,7 @@ int do_bedbug_dis (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        len = dis_last_len;
 
        if (argc < 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -126,7 +126,7 @@ int do_bedbug_asm (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        int rcode = 0;
 
        if (argc < 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index bc08b2655a9a4b725740c335a1b8377c91f29216..e60f18b15b5cbb8a92fe00295dfd67d716cdb2ad 100644 (file)
@@ -120,7 +120,7 @@ int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                y = simple_strtoul(argv[4], NULL, 10);
                break;
        default:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -132,7 +132,7 @@ int do_bmp(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        } else if (strncmp(argv[1],"display",1) == 0) {
            return (bmp_display(addr, x, y));
        } else {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 }
index 6024ffeb42be1fa933ea1eb2a3be1fa775f02dcc..36106c7e606c64d60033362446302bcf9c0748d6 100644 (file)
@@ -41,7 +41,7 @@ int do_go (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        int     rcode = 0;
 
        if (argc < 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index 905567293cd2299054b843bbe57aa8c971a806f5..68f167594ccca38e37bf7fe5341f1c83d802924c 100644 (file)
@@ -454,13 +454,13 @@ int do_bootm_subcommand (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        }
        /* Unrecognized command */
        else {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
        if (images.state >= state) {
                printf ("Trying to execute a command out of order\n");
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index 675d43fa1877cc8320d3684b17caaf6cf23b295f..caa56daf2ed439a85dbc4524fd56a5c2071bc268 100644 (file)
@@ -37,7 +37,7 @@ int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        case 2:                 /* on / off     */
                switch (on_off(argv[1])) {
 #if 0  /* prevented by varargs handling; FALLTROUGH is harmless, too */
-               default: printf ("Usage:\n%s\n", cmdtp->usage);
+               default: cmd_usage(cmdtp);
                        return;
 #endif
                case 0: icache_disable();
@@ -51,7 +51,7 @@ int do_icache ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        icache_status() ? "ON" : "OFF");
                return 0;
        default:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
        return 0;
@@ -63,7 +63,7 @@ int do_dcache ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        case 2:                 /* on / off     */
                switch (on_off(argv[1])) {
 #if 0  /* prevented by varargs handling; FALLTROUGH is harmless, too */
-               default: printf ("Usage:\n%s\n", cmdtp->usage);
+               default: cmd_usage(cmdtp);
                        return;
 #endif
                case 0: dcache_disable();
@@ -77,7 +77,7 @@ int do_dcache ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        dcache_status() ? "ON" : "OFF");
                return 0;
        default:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
        return 0;
index b4d9649bddea8de360049da09672badc282a4633..d6bd931caff017afdfad65befb1d22560ec4a509 100644 (file)
@@ -89,7 +89,7 @@ int do_date (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
                break;
        default:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                rcode = 1;
        }
 
index 439d07a65ddcad04d389741da8f9ca4a536a3caf..7d382bbbf248dbcf087415e2525efd17260f0b9b 100644 (file)
@@ -45,7 +45,7 @@ int do_getdcr ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] )
 
        /* Validate arguments */
        if (argc < 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -74,7 +74,7 @@ int do_setdcr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 
        /* Validate arguments */
        if (argc < 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -121,7 +121,7 @@ int do_getidcr (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
        /* Validate arguments */
        if (argc < 3) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -177,7 +177,7 @@ int do_setidcr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 
        /* Validate arguments */
        if (argc < 4) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index 5f650442c018edb81aacc6c22ddbe0f49682087f..c85b7a62417b8ee5934b7e49649ef89b4d8adf88 100644 (file)
@@ -27,7 +27,7 @@ static int do_df(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        }
 
 usage:
-       printf("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
 }
 
index 02502cc810cf438606c0103d89a584771da543a6..f139d42cbaf1a7c11c30f56a075e9cac88fb01dc 100644 (file)
@@ -96,7 +96,7 @@ int do_doc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
     switch (argc) {
     case 0:
     case 1:
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
     case 2:
        if (strcmp(argv[1],"info") == 0) {
@@ -121,7 +121,7 @@ int do_doc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                doc_print(&doc_dev_desc[curr_device]);
                return 0;
        }
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
     case 3:
        if (strcmp(argv[1],"device") == 0) {
@@ -146,7 +146,7 @@ int do_doc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                return 0;
        }
 
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
     default:
        /* at least 4 args */
@@ -182,7 +182,7 @@ int do_doc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
                return ret;
        } else {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                rcode = 1;
        }
 
@@ -235,7 +235,7 @@ int do_docboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                offset = simple_strtoul(argv[3], NULL, 16);
                break;
        default:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                show_boot_progress (-35);
                return 1;
        }
index 2451bef74f4056c020bee4e03832a79d8c204e8f..c59227d6049335ad94ec4c9dc0b8bd5e432e18f4 100644 (file)
@@ -104,7 +104,7 @@ int do_eeprom ( cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                }
        }
 
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
 }
 #endif
index 9c43792f328ec23530b3d86a726b9f34375cda5e..05a053b45bd36ac1e373196283f74da057c48c7b 100644 (file)
@@ -66,7 +66,7 @@ int do_ext2ls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        int part_length;
 
        if (argc < 3) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return(1);
        }
        dev = (int)simple_strtoul (argv[2], &ep, 16);
@@ -164,7 +164,7 @@ int do_ext2load (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                break;
 
        default:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return(1);
        }
 
index d995ff21ef9f91edca56d2de688b96c1614b672e..c6265c38c69111ac80eea749e6c0a783de01e19f 100644 (file)
@@ -801,7 +801,7 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                boot_drive=simple_strtoul(argv[2], NULL, 10);
                break;
        default:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
        /* setup FDC and scan for drives  */
index aa13b526165226e20051be39f6a44da143efed07..514c049b8b503eeb445b64bdad1cf3fe29181187 100644 (file)
@@ -73,7 +73,7 @@ int do_fdosboot(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        name = argv [2];
        break;
     default:
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        break;
     }
 
index 4274a773a7a7b5b8bb80eaf99a769e2e929f6375..a36ca20d5b44ebfdade4c29a6ddd1e49cad43b9b 100644 (file)
@@ -66,7 +66,7 @@ void set_working_fdt_addr(void *addr)
 int do_fdt (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;
        }
 
@@ -125,7 +125,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                int  err;
 
                if (argc < 4) {
-                       printf ("Usage:\n%s\n", cmdtp->usage);
+                       cmd_usage(cmdtp);
                        return 1;
                }
 
@@ -179,7 +179,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                 * Parameters: Node path, new node to be appended to the path.
                 */
                if (argc < 4) {
-                       printf ("Usage:\n%s\n", cmdtp->usage);
+                       cmd_usage(cmdtp);
                        return 1;
                }
 
@@ -217,7 +217,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                 * Parameters: Node path, property, optional value.
                 */
                if (argc < 4) {
-                       printf ("Usage:\n%s\n", cmdtp->usage);
+                       cmd_usage(cmdtp);
                        return 1;
                }
 
@@ -427,7 +427,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                        }
                } else {
                        /* Unrecognized command */
-                       printf ("Usage:\n%s\n", cmdtp->usage);
+                       cmd_usage(cmdtp);
                        return 1;
                }
        }
@@ -441,7 +441,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                unsigned long initrd_start = 0, initrd_end = 0;
 
                if ((argc != 2) && (argc != 4)) {
-                       printf ("Usage:\n%s\n", cmdtp->usage);
+                       cmd_usage(cmdtp);
                        return 1;
                }
 
@@ -459,7 +459,7 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        }
        else {
                /* Unrecognized command */
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index 93eefa96432998d894ed5b439fc844c51c5680fe..2df40f0ee545080ebf56eaa10aaf777d93e5a8f1 100644 (file)
@@ -333,7 +333,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        int rcode = 0;
 
        if (argc < 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -384,7 +384,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 #endif
 
        if (argc != 3) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -407,7 +407,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        }
 
        if (addr_first >= addr_last) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -481,7 +481,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 #endif
 
        if (argc < 3) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -490,7 +490,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        } else if (strcmp(argv[1], "on") == 0) {
                p = 1;
        } else {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -591,7 +591,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 #endif
 
        if (argc != 4) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -633,7 +633,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        }
 
        if (addr_first >= addr_last) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
        rcode = flash_sect_protect (p, addr_first, addr_last);
index dcbbc993dd271ff8b17d535abb5bbbbf47be0152..4abb86e9146a8a53aed8a4edb44432dbd5d402f2 100644 (file)
@@ -320,7 +320,7 @@ int do_fpga (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 
 static void fpga_usage (cmd_tbl_t * cmdtp)
 {
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
 }
 
 /*
index 448f2fedd7fae420407d2df61af5e6ec9a6e263c..170ebc7251ae8ac23eef8b00f8bae5a0d5b65010 100644 (file)
@@ -159,7 +159,7 @@ int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        length = i2c_dp_last_length;
 
        if (argc < 3) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -184,7 +184,7 @@ int do_i2c_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        if (argv[2][j] == '.') {
                                alen = argv[2][j+1] - '0';
                                if (alen > 4) {
-                                       printf ("Usage:\n%s\n", cmdtp->usage);
+                                       cmd_usage(cmdtp);
                                        return 1;
                                }
                                break;
@@ -269,7 +269,7 @@ int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        int     j;
 
        if ((argc < 4) || (argc > 5)) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -287,7 +287,7 @@ int do_i2c_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                if (argv[2][j] == '.') {
                        alen = argv[2][j+1] - '0';
                        if (alen > 4) {
-                               printf ("Usage:\n%s\n", cmdtp->usage);
+                               cmd_usage(cmdtp);
                                return 1;
                        }
                        break;
@@ -355,7 +355,7 @@ int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        int     j;
 
        if (argc < 4) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -373,7 +373,7 @@ int do_i2c_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                if (argv[2][j] == '.') {
                        alen = argv[2][j+1] - '0';
                        if (alen > 4) {
-                               printf ("Usage:\n%s\n", cmdtp->usage);
+                               cmd_usage(cmdtp);
                                return 1;
                        }
                        break;
@@ -427,7 +427,7 @@ mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[])
        extern char console_buffer[];
 
        if (argc != 3) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -463,7 +463,7 @@ mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[])
                        if (argv[2][j] == '.') {
                                alen = argv[2][j+1] - '0';
                                if (alen > 4) {
-                                       printf ("Usage:\n%s\n", cmdtp->usage);
+                                       cmd_usage(cmdtp);
                                        return 1;
                                }
                                break;
@@ -601,7 +601,7 @@ int do_i2c_loop(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        int     j;
 
        if (argc < 3) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -619,7 +619,7 @@ int do_i2c_loop(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                if (argv[2][j] == '.') {
                        alen = argv[2][j+1] - '0';
                        if (alen > 4) {
-                               printf ("Usage:\n%s\n", cmdtp->usage);
+                               cmd_usage(cmdtp);
                                return 1;
                        }
                        break;
@@ -764,7 +764,7 @@ int do_sdram (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;
        }
        /*
@@ -1293,7 +1293,7 @@ int do_i2c(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                return do_sdram(cmdtp, flag, --argc, ++argv);
 #endif
        else
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
        return 0;
 }
 #endif  /* CONFIG_I2C_CMD_TREE */
index db05f76e5c52de37f932bd20a828ec08bf31a84a..3afa38d9ce4b57e7fe59b433590a20eacc3406a5 100644 (file)
@@ -188,7 +188,7 @@ int do_ide (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
     switch (argc) {
     case 0:
     case 1:
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
     case 2:
        if (strncmp(argv[1],"res",3) == 0) {
@@ -238,7 +238,7 @@ int do_ide (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                }
                return rcode;
        }
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
     case 3:
        if (strncmp(argv[1],"dev",3) == 0) {
@@ -287,7 +287,7 @@ int do_ide (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 #endif
        }
 
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
     default:
        /* at least 4 args */
@@ -347,7 +347,7 @@ int do_ide (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        return 1;
                }
        } else {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                rcode = 1;
        }
 
@@ -383,7 +383,7 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                boot_device = argv[2];
                break;
        default:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                show_boot_progress (-42);
                return 1;
        }
index 04914c62116414d4afa47ac156a161e2990e6bc5..a47cde4245c11c42f166ce57355158a354e933ea 100644 (file)
@@ -28,7 +28,7 @@ int do_interrupts(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;
        }
 
index 9e77fa91319fb386e8e89ed41d7011fb11451bdc..b3025e37ebac4cef9ad3c8c0e2fced037741bd34 100644 (file)
@@ -161,7 +161,7 @@ int do_itest ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] )
 
        /* Validate arguments */
        if ((argc != 4)){
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index 0818ea811b2be3a96116fdd8a45f4ff25e6e332f..4c63f51c104f9a8562a7d06eb2595ae9a51c3131 100644 (file)
@@ -2289,7 +2289,7 @@ int do_jffs2_mtdparts(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                return delete_partition(argv[2]);
        }
 
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
 }
 #endif /* #ifdef CONFIG_JFFS2_CMDLINE */
index 65a4d692a9fa6dc1a07ac4194cd78bd0c46e9481..350d7a3524aa93cfe56b868b83b569ad3fb8d9bc 100644 (file)
@@ -1119,7 +1119,7 @@ int do_hwflow (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        if (strcmp(argv[1], "on") == 0)
                                hwflow_onoff(1);
                        else
-                               printf("Usage: %s\n", cmdtp->usage);
+                               cmd_usage(cmdtp);
        }
        printf("RTS/CTS hardware flow control: %s\n", hwflow_onoff(0) ? "on" : "off");
        return 0;
index febdb90cfcb243530d2d47d727b78558c03b833a..6f8a27fe445c0909ba9a6a16115b371f90b4cc5c 100644 (file)
@@ -241,11 +241,11 @@ int do_log (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        }
                        return 0;
                }
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
 
        default:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 }
index c209d62d8ebee570265d6a737d475a6536f0036b..e2af03063831ff4076dd97d56845562273e4349d 100644 (file)
@@ -77,7 +77,7 @@ int do_mem_md ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        length = dp_last_length;
 
        if (argc < 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -173,7 +173,7 @@ int do_mem_mw ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        int     size;
 
        if ((argc < 3) || (argc > 4)) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -217,7 +217,7 @@ int do_mem_mdc ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        ulong count;
 
        if (argc < 4) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -246,7 +246,7 @@ int do_mem_mwc ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        ulong count;
 
        if (argc < 4) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -277,7 +277,7 @@ int do_mem_cmp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        int     rcode = 0;
 
        if (argc != 4) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -361,7 +361,7 @@ int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        int     size;
 
        if (argc != 4) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -525,7 +525,7 @@ int do_mem_loop (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        volatile u_char *cp;
 
        if (argc < 3) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -596,7 +596,7 @@ int do_mem_loopw (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        volatile u_char *cp;
 
        if (argc < 4) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -1001,7 +1001,7 @@ mod_mem(cmd_tbl_t *cmdtp, int incrflag, 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;
        }
 
@@ -1106,7 +1106,7 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        ulong *ptr;
 
        if (argc < 3) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -1142,7 +1142,7 @@ int do_mem_crc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
        if (argc < 3) {
   usage:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -1202,7 +1202,7 @@ int do_unzip ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        dst = simple_strtoul(argv[2], NULL, 16);
                        break;
                default:
-                       printf ("Usage:\n%s\n", cmdtp->usage);
+                       cmd_usage(cmdtp);
                        return 1;
        }
 
index c2442eed136d27e13fe4c49d1968882f00b25d6a..db2a994ce410ef4a2b7f1f0d81372e2daa2e5479 100644 (file)
@@ -38,7 +38,7 @@ int do_frd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        unsigned int blocking;
 
        if (argc < 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -46,7 +46,7 @@ int do_frd (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        blocking = (unsigned int)simple_strtoul (argv[2], NULL, 16);
        if (fslnum < 0 || fslnum >= XILINX_FSL_NUMBER) {
                puts ("Bad number of FSL\n");
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -196,7 +196,7 @@ int do_fwr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        unsigned int blocking;
 
        if (argc < 3) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -204,7 +204,7 @@ int do_fwr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        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) {
-               printf ("Bad number of FSL\nUsage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -354,7 +354,7 @@ int do_rspr (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        unsigned int val = 0;
 
        if (argc < 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
        reg = (unsigned int)simple_strtoul (argv[1], NULL, 16);
index bcbd7aa4ee33556f5bae516fa835833ab95b0d2e..19a7fbd68842e7f3d241ec729bcd909adfa444a8 100644 (file)
@@ -302,7 +302,7 @@ int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        char            *devname;
 
        if (argc < 2) {
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -431,7 +431,7 @@ int do_mii (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                else
                        miiphy_set_current_dev (argv[2]);
        } else {
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index 3ea8ee07f760e01a2c622bff5b6c8d79a0ab4bf1..c29f52baecfb52bbc0cbf7ab2177fa22d944cd74 100644 (file)
@@ -33,7 +33,7 @@ int do_sleep (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        ulong delay;
 
        if (argc != 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index f3a7f49e10f84634a61d94bb7e02118f14e7104c..d8e3ab2b247e18238424223f4654c9b2b96716b5 100644 (file)
@@ -29,7 +29,7 @@ cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        unsigned long cpuid;
 
        if (argc < 3) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -47,7 +47,7 @@ cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                } else if (strncmp(argv[2], "status", 6) == 0) {
                        cpu_status(cpuid);
                } else {
-                       printf ("Usage:\n%s\n", cmdtp->usage);
+                       cmd_usage(cmdtp);
                        return 1;
                }
                return 0;
@@ -55,12 +55,12 @@ cpu_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
        /* 4 or greater, make sure its release */
        if (strncmp(argv[2], "release", 7) != 0) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
        if (cpu_release(cpuid, argc - 3, argv + 3)) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index aedf8a624e7c978770b7427f90585c12dde0be31..55d54669c2a3c2e1bca7c5029b39e55ba1ac66bc 100644 (file)
@@ -463,7 +463,7 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 #endif
 
 usage:
-       printf("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
 }
 
@@ -638,7 +638,7 @@ int do_nandboot(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 #if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_JFFS2_CMDLINE)
 usage:
 #endif
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                show_boot_progress(-53);
                return 1;
        }
@@ -751,7 +751,7 @@ int do_nand (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        switch (argc) {
        case 0:
        case 1:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        case 2:
                if (strcmp (argv[1], "info") == 0) {
@@ -789,7 +789,7 @@ int do_nand (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                        return 0;
 
                }
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        case 3:
                if (strcmp (argv[1], "device") == 0) {
@@ -828,7 +828,7 @@ int do_nand (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                        return ret;
                }
 
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        default:
                /* at least 4 args */
@@ -877,7 +877,7 @@ int do_nand (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                        }
 #endif /* CONFIG_SYS_NAND_SKIP_BAD_DOT_I */
                        else if (cmdtail) {
-                               printf ("Usage:\n%s\n", cmdtp->usage);
+                               cmd_usage(cmdtp);
                                return 1;
                        }
 
@@ -913,7 +913,7 @@ int do_nand (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 
                        return ret;
                } else {
-                       printf ("Usage:\n%s\n", cmdtp->usage);
+                       cmd_usage(cmdtp);
                        rcode = 1;
                }
 
@@ -970,7 +970,7 @@ int do_nandboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                offset = simple_strtoul(argv[3], NULL, 16);
                break;
        default:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                show_boot_progress (-53);
                return 1;
        }
index c053d7b97a7c169962496a95a9b753bf2d36aeac..b627c3851a965b6a8265bf9f1ff38006e18fd5b4 100644 (file)
@@ -186,7 +186,7 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char *argv[])
 
                break;
 
-       default: printf ("Usage:\n%s\n", cmdtp->usage);
+       default: cmd_usage(cmdtp);
                show_boot_progress (-80);
                return 1;
        }
@@ -251,7 +251,7 @@ int do_ping (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
        NetPingIP = string_to_ip(argv[1]);
        if (NetPingIP == 0) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return -1;
        }
 
index b93de13d086d48252fe3f26f91b47a471447dfe5..af404176aa24645a570b370eb3f08863a7703559 100644 (file)
@@ -408,7 +408,7 @@ void forceenv (char *varname, char *varvalue)
 int do_setenv (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;
        }
 
@@ -434,13 +434,13 @@ int do_askenv ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        local_args[3] = NULL;
 
        if (argc < 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
        /* Check the syntax */
        switch (argc) {
        case 1:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
 
        case 2:         /* askenv envname */
index 6a2c924929bd5d99d4a2a5842d1250dc7c42e673..6d43a7794408f5a7c29142f259b3e08cc82db883 100644 (file)
@@ -465,7 +465,7 @@ int do_onenand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        return 0;
 
 usage:
-       printf("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
 }
 
index 825fa34cebbf573ee99e4b67fcae46d82b00d5e8..bdf2e6a8be6b8351a951feda71cb55cb10aca79d 100644 (file)
@@ -57,7 +57,7 @@ int do_otp(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                otp_func = otp_write;
        else {
  usage:
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index 67ff2fbc3b45181a6069941596a8707bc52ae289..110415e7dcc88eae1b357710aeaf64f8c6a41584 100644 (file)
@@ -534,7 +534,7 @@ int do_pci (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
        return 1;
  usage:
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
 }
 
index c88fcd5e451b415ff652378ccdb256c726d4ce88..b318ff0924867c01d923b9d0deec73e0187457e3 100644 (file)
@@ -44,7 +44,7 @@ int do_portio_out (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        uint value = out_last_value;
 
        if (argc != 3) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -103,7 +103,7 @@ int do_portio_in (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        uint size = in_last_size;
 
        if (argc != 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index 4f4117ec7095e0d26f435e7ca463befb68631255..a2f22866b656994a15390f03e3131a86d29848ca 100644 (file)
@@ -57,7 +57,7 @@ int do_reiserls (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        int part_length;
 
        if (argc < 3) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
        dev = (int)simple_strtoul (argv[2], &ep, 16);
@@ -150,7 +150,7 @@ int do_reiserload (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                break;
 
        default:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index c6e0d3760ad83d7087c3e950315d4f0b51ff0ddc..3380768bbe74881aaa327e4e244a6b4b5da8cc8d 100644 (file)
@@ -77,7 +77,7 @@ int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        switch (argc) {
        case 0:
        case 1:
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        case 2:
                if (strncmp(argv[1],"inf", 3) == 0) {
@@ -115,7 +115,7 @@ int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        }
                        return rc;
                }
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        case 3:
                if (strncmp(argv[1], "dev", 3) == 0) {
@@ -147,7 +147,7 @@ int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                        }
                        return rc;
                }
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
 
        default: /* at least 4 args */
@@ -184,7 +184,7 @@ int do_sata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                                n, (n == cnt) ? "OK" : "ERROR");
                        return (n == cnt) ? 0 : 1;
                } else {
-                       printf("Usage:\n%s\n", cmdtp->usage);
+                       cmd_usage(cmdtp);
                        rc = 1;
                }
 
index 066fd804a84e00c4b8bac42d8fe366221a2dbbbc..8aae9fcac30ba59968e17147422086241aade6a8 100644 (file)
@@ -229,7 +229,7 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                boot_device = argv[2];
                break;
        default:
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -346,7 +346,7 @@ int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
        switch (argc) {
     case 0:
-    case 1:    printf ("Usage:\n%s\n", cmdtp->usage);  return 1;
+    case 1:    cmd_usage(cmdtp);       return 1;
     case 2:
                        if (strncmp(argv[1],"res",3) == 0) {
                                printf("\nReset SCSI\n");
@@ -392,7 +392,7 @@ int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                                        printf("\nno SCSI devices available\n");
                                return 1;
                        }
-                       printf ("Usage:\n%s\n", cmdtp->usage);
+                       cmd_usage(cmdtp);
                        return 1;
        case 3:
                        if (strncmp(argv[1],"dev",3) == 0) {
@@ -421,7 +421,7 @@ int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                                }
                                return 1;
                        }
-                       printf ("Usage:\n%s\n", cmdtp->usage);
+                       cmd_usage(cmdtp);
                        return 1;
     default:
                        /* at least 4 args */
@@ -437,7 +437,7 @@ int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                                return 0;
                        }
        } /* switch */
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
 }
 
index 2e49b6dd9281c9229f4c7357aa78dd49db646a2b..4125b183db1c40c1a4b619e187d362784c59bde7 100644 (file)
@@ -35,7 +35,7 @@ int do_setexpr(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
        /* Validate arguments */
        if ((argc != 5) || (strlen(argv[3]) != 1)) {
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index 8c0a7514dfa210436f066ba81300ba6a409f071d..6dc522d7a271537cf2b5d804e5a82a7fe1a16c2e 100644 (file)
@@ -175,7 +175,7 @@ static int do_spi_flash(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                return do_spi_flash_erase(argc - 1, argv + 1);
 
 usage:
-       printf("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
 }
 
index 7d05cf8e938d10616070fefccfcc65f75b4bdfb7..6f0cbca1a028926eb250e25a913b38469b0a837b 100644 (file)
@@ -15,7 +15,7 @@ static char *start_addr, *last_addr;
 int do_strings(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
        if (argc == 1) {
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index 5c31f7b49f0027a966d22eed7db9b0fcdc8ad87e..305e2e17aea56b6be521dcd69c3985c7d4c1ab44 100644 (file)
@@ -441,7 +441,7 @@ static int do_ubi(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        int err = 0;
 
        if (argc < 2) {
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -459,7 +459,7 @@ static int do_ubi(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                }
 
                if (argc < 4) {
-                       printf("Usage:\n%s\n", cmdtp->usage);
+                       cmd_usage(cmdtp);
                        return 1;
                }
 
index 8b19240a840bc99b8a2d0568cf6e95558be5f683..46d6eea572fbf2a9a10f5b8bbd3554bc9cd96c7b 100644 (file)
@@ -366,7 +366,7 @@ int do_usbboot(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                boot_device = argv[2];
                break;
        default:
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -659,7 +659,7 @@ int do_usb(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                return 0;
        }
 #endif /* CONFIG_USB_STORAGE */
-       printf("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
 }
 
index 45f427126da27cf774c4bfceeba126980041829c..ef4dd835b5293e5fe94cdc48d67835561daae19e 100644 (file)
@@ -50,7 +50,7 @@ int do_vfd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        ulong bitmap;
 
        if (argc != 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index a4a978c5fdc676249bc6f73c7e639acfc1b9dc72..c3966484f9a87eaf7b4d2b04f633b0e4665ee157 100644 (file)
@@ -379,6 +379,11 @@ cmd_tbl_t *find_cmd (const char *cmd)
        return find_cmd_tbl(cmd, &__u_boot_cmd_start, len);
 }
 
+void cmd_usage(cmd_tbl_t *cmdtp)
+{
+       printf("Usage:\n%s\n", cmdtp->usage);
+}
+
 #ifdef CONFIG_AUTO_COMPLETE
 
 int var_complete(int argc, char *argv[], char last_char, int maxv, char *cmdv[])
index 9aef6e41dbfdbec4a6b3be491db09cd3744c6068..dbb4035613d9dcf4a32522acc534835a1b989b5e 100644 (file)
@@ -1696,7 +1696,7 @@ static int run_pipe_real(struct pipe *pi)
 #endif
                                /* found - check max args */
                                if ((child->argc - i) > cmdtp->maxargs) {
-                                       printf ("Usage:\n%s\n", cmdtp->usage);
+                                       cmd_usage(cmdtp);
                                        return -1;
                                }
 #endif
index 4c4f7806500887c2f1ff008786ecedaeab3cce32..905d40f0e0961ad6b3f2f5140979dfaf5fe163ba 100644 (file)
@@ -1371,7 +1371,7 @@ int run_command (const char *cmd, int flag)
 
                /* found - check max args */
                if (argc > cmdtp->maxargs) {
-                       printf ("Usage:\n%s\n", cmdtp->usage);
+                       cmd_usage(cmdtp);
                        rc = -1;
                        continue;
                }
@@ -1415,7 +1415,7 @@ int do_run (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        int i;
 
        if (argc < 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index f1be485e8eb90a9d0162a5be97c705b2ba2982c3..c969ff65e6fc3cece16ed8747cea094905c8dd62 100644 (file)
@@ -72,7 +72,7 @@ void bedbug603e_do_break (cmd_tbl_t *cmdtp, int flag, int argc,
 
   if (argc < 2)
   {
-    printf ("Usage:\n%s\n", cmdtp->usage);
+    cmd_usage(cmdtp);
     return;
   }
 
@@ -119,7 +119,7 @@ void bedbug603e_do_break (cmd_tbl_t *cmdtp, int flag, int argc,
        (( argv[ 1 ][ 0 ] >= 'a' ) && ( argv[ 1 ][ 0 ] <= 'f' )) ||
        (( argv[ 1 ][ 0 ] >= 'A' ) && ( argv[ 1 ][ 0 ] <= 'F' ))))
   {
-    printf ("Usage:\n%s\n", cmdtp->usage);
+    cmd_usage(cmdtp);
     return;
   }
 
index 5ab169fe3e0f5524357074737efdff32c62584d9..47c8937aa6c5b8a77acd1fff2528b3a838b287d0 100644 (file)
@@ -119,7 +119,7 @@ int do_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        writeback[1] = 0x89abcdefUL;
 
        if (argc > 4) {
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -350,7 +350,7 @@ int do_ecc(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                        return 0;
                }
        }
-       printf("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
 }
 
index 5d523663924f07d1cc7e791039782988562ba77d..0308bbbf7a8439c9c38783c1f7c995563ee1cd1c 100644 (file)
@@ -71,7 +71,7 @@ void bedbug860_do_break (cmd_tbl_t *cmdtp, int flag, int argc,
 
   if (argc < 2)
   {
-    printf ("Usage:\n%s\n", cmdtp->usage);
+    cmd_usage(cmdtp);
     return;
   }
 
@@ -122,7 +122,7 @@ void bedbug860_do_break (cmd_tbl_t *cmdtp, int flag, int argc,
 
   if( !isdigit( argv[ 1 ][ 0 ]))
   {
-    printf ("Usage:\n%s\n", cmdtp->usage);
+    cmd_usage(cmdtp);
     return;
   }
 
index 5ef5607918d6a45e87b2a40098bd5b81ed973166..ef11cb65e41a072fb8fb53c5f2c0c3eac2bb41a9 100644 (file)
@@ -71,7 +71,7 @@ void bedbug405_do_break (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        /* -------------------------------------------------- */
 
        if (argc < 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return;
        }
 
@@ -125,7 +125,7 @@ void bedbug405_do_break (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
        /* Set a breakpoint at the address */
 
        if (!isdigit (argv[1][0])) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return;
        }
 
index 390d99ad3d62e2d5effe7f210e2b0ed90b53b34a..f80baeb1fa63a2359f32fea2a6a9bfdb26464f0d 100644 (file)
@@ -164,7 +164,7 @@ int do_pca953x(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        if (!c || !((argc == (c->maxargs)) ||
                (((int)c->cmd == PCA953X_CMD_DEVICE) &&
                 (argc == (c->maxargs - 1))))) {
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index 4cd2fc224987bc8c10c9324dc14b76da8e5d70fa..958ff6845416380948691560eb616eb41474d065 100644 (file)
@@ -294,7 +294,7 @@ int do_ds4510(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        if (!c || !((argc == (c->maxargs)) ||
                (((int)c->cmd == DS4510_CMD_DEVICE) &&
                 (argc == (c->maxargs - 1))))) {
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -371,7 +371,7 @@ int do_ds4510(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        } else if (strcmp(argv[2], "write") == 0) {
                rw_func = ds4510_mem_write;
        } else {
-               printf("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
index e914d01d8051deafd3064bcc3c6150b61a020fcd..7b29fd71601baca229c0b298b06c7f5de9d5a2b4 100644 (file)
@@ -425,7 +425,7 @@ static int qe_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        ulong addr;
 
        if (argc < 3) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -455,7 +455,7 @@ static int qe_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
                return qe_upload_firmware((const struct qe_firmware *) addr);
        }
 
-       printf ("Usage:\n%s\n", cmdtp->usage);
+       cmd_usage(cmdtp);
        return 1;
 }
 
index a8a153cb0fca3b9bde3b503aef719388d335d0fb..58992e9796fcac75f59ac55ab8de1e0019bcdde8 100644 (file)
@@ -64,6 +64,8 @@ extern cmd_tbl_t  __u_boot_cmd_end;
 cmd_tbl_t *find_cmd(const char *cmd);
 cmd_tbl_t *find_cmd_tbl (const char *cmd, cmd_tbl_t *table, int table_len);
 
+extern void cmd_usage(cmd_tbl_t *cmdtp);
+
 #ifdef CONFIG_AUTO_COMPLETE
 extern void install_auto_complete(void);
 extern int cmd_auto_complete(const char *const prompt, char *buf, int *np, int *colp);
index 5ff7336599bb06b59b2368c39ae18d7da39711f9..5ce45baeb44dd5f30aeaeb2a6f99a48fdc12e205 100644 (file)
@@ -122,7 +122,7 @@ int do_flerase(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
        int rcode = 0;
 
        if (argc < 2) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -147,7 +147,7 @@ int do_flerase(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
        }
 
        if (argc != 3) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -168,7 +168,7 @@ int do_flerase(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
        addr_last  = simple_strtoul(argv[2], NULL, 16);
 
        if (addr_first >= addr_last) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -244,7 +244,7 @@ int do_protect(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
        int rcode = 0;
 
        if (argc < 3) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -253,7 +253,7 @@ int do_protect(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
        else if (strcmp(argv[1], "on") == 0)
                p = 1;
        else {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -310,7 +310,7 @@ int do_protect(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
        }
 
        if (argc != 4) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -350,7 +350,7 @@ int do_protect(cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
        addr_last  = simple_strtoul(argv[3], NULL, 16);
 
        if (addr_first >= addr_last) {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
        rcode = flash_sect_protect (p, addr_first, addr_last);