default:
-#ifdef CFG_LONGHELP
- if(cmdtp->help != NULL){
- printf("Usage:\n%s %s\n", cmdtp->name, cmdtp->help);
- } else {
- printf("Usage:\n%s %s\n", cmdtp->name, cmdtp->usage);
- }
-#else
- printf("Usage:\n%s %s\n", cmdtp->name, cmdtp->usage);
-#endif
+ print_cmd_help(cmdtp);
return 1;
}
int do_ping(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]){
if(argc < 2){
-#ifdef CFG_LONGHELP
- if(cmdtp->help != NULL){
- printf("Usage:\n%s %s\n", cmdtp->name, cmdtp->help);
- } else {
- printf("Usage:\n%s %s\n", cmdtp->name, cmdtp->usage);
- }
-#else
- printf("Usage:\n%s %s\n", cmdtp->name, cmdtp->usage);
-#endif
+ print_cmd_help(cmdtp);
return(-1);
}
NetPingIP = string_to_ip(argv[1]);
if (NetPingIP == 0){
-#ifdef CFG_LONGHELP
- if(cmdtp->help != NULL){
- printf("Usage:\n%s %s\n", cmdtp->name, cmdtp->help);
- } else {
- printf("Usage:\n%s %s\n", cmdtp->name, cmdtp->usage);
- }
-#else
- printf("Usage:\n%s %s\n", cmdtp->name, cmdtp->usage);
-#endif
+ print_cmd_help(cmdtp);
return(-1);
}
char *toff;
if(argc < 2){
-#ifdef CFG_LONGHELP
- if(cmdtp->help != NULL){
- printf("Usage:\n%s %s\n", cmdtp->name, cmdtp->help);
- } else {
- printf("Usage:\n%s %s\n", cmdtp->name, cmdtp->usage);
- }
-#else
- printf("Usage:\n%s %s\n", cmdtp->name, cmdtp->usage);
-#endif
+ print_cmd_help(cmdtp);
return(-1);
} else {
NetNtpServerIP = string_to_ip(argv[1]);