diff --git a/commands/boot.c b/commands/boot.c index 8b3b407..102ca07 100644 --- a/commands/boot.c +++ b/commands/boot.c @@ -53,6 +53,8 @@ case 'w': boot_set_watchdog_timeout(simple_strtoul(optarg, NULL, 0)); break; + default: + return COMMAND_ERROR_USAGE; } } diff --git a/commands/bootm.c b/commands/bootm.c index 61b9086..c7cbdbe 100644 --- a/commands/bootm.c +++ b/commands/bootm.c @@ -97,7 +97,7 @@ data.dryrun = 1; break; default: - break; + return COMMAND_ERROR_USAGE; } } diff --git a/commands/dhcp.c b/commands/dhcp.c index eb98bfc..4f4f549 100644 --- a/commands/dhcp.c +++ b/commands/dhcp.c @@ -45,6 +45,8 @@ case 'r': retries = simple_strtoul(optarg, NULL, 10); break; + default: + return COMMAND_ERROR_USAGE; } } diff --git a/commands/fbtest.c b/commands/fbtest.c index d070d1f..bd0e140 100644 --- a/commands/fbtest.c +++ b/commands/fbtest.c @@ -137,6 +137,8 @@ case 'c': color = simple_strtoul(optarg, NULL, 16); break; + default: + return COMMAND_ERROR_USAGE; } } diff --git a/commands/hashsum.c b/commands/hashsum.c index d05e571..70aab2c 100644 --- a/commands/hashsum.c +++ b/commands/hashsum.c @@ -42,6 +42,8 @@ key = optarg; keylen = strlen(key); break; + default: + return COMMAND_ERROR_USAGE; } } diff --git a/commands/help.c b/commands/help.c index 3d36d9b..819c406 100644 --- a/commands/help.c +++ b/commands/help.c @@ -98,6 +98,8 @@ case 'a': all = 1; break; + default: + return COMMAND_ERROR_USAGE; } } diff --git a/commands/hwclock.c b/commands/hwclock.c index 6a0fe03..5073618 100644 --- a/commands/hwclock.c +++ b/commands/hwclock.c @@ -123,6 +123,8 @@ ntp_to_hw = 1; ntpserver = optarg; break; + default: + return COMMAND_ERROR_USAGE; } } diff --git a/commands/linux16.c b/commands/linux16.c index bb678bd..db8d081 100644 --- a/commands/linux16.c +++ b/commands/linux16.c @@ -176,6 +176,8 @@ } } break; + default: + return COMMAND_ERROR_USAGE; } } diff --git a/commands/loadb.c b/commands/loadb.c index 6180ce3..8c3906c 100644 --- a/commands/loadb.c +++ b/commands/loadb.c @@ -634,8 +634,7 @@ console_dev_name = optarg; break; default: - perror(argv[0]); - return 1; + return COMMAND_ERROR_USAGE; } } diff --git a/commands/loadxy.c b/commands/loadxy.c index a4b1bec..a2aab0f 100644 --- a/commands/loadxy.c +++ b/commands/loadxy.c @@ -67,8 +67,7 @@ cname = optarg; break; default: - perror(argv[0]); - return 1; + return COMMAND_ERROR_USAGE; } } diff --git a/commands/ls.c b/commands/ls.c index ce02f16..331a4d2 100644 --- a/commands/ls.c +++ b/commands/ls.c @@ -143,6 +143,8 @@ case 'l': flags &= ~LS_COLUMN; break; + default: + return COMMAND_ERROR_USAGE; } } diff --git a/commands/mem.c b/commands/mem.c index 907f1f7..29eaa80 100644 --- a/commands/mem.c +++ b/commands/mem.c @@ -74,7 +74,7 @@ *swab = 1; break; default: - return -1; + return COMMAND_ERROR_USAGE; } } diff --git a/commands/menutree.c b/commands/menutree.c index ea5f65f..cf37b01 100644 --- a/commands/menutree.c +++ b/commands/menutree.c @@ -26,6 +26,8 @@ case 'm': path = optarg; break; + default: + return COMMAND_ERROR_USAGE; } } diff --git a/commands/reset.c b/commands/reset.c index 8300480..6eac532 100644 --- a/commands/reset.c +++ b/commands/reset.c @@ -34,6 +34,8 @@ case 'f': shutdown_flag = 0; break; + default: + return COMMAND_ERROR_USAGE; } } diff --git a/commands/splash.c b/commands/splash.c index 15b296b..2b70b29 100644 --- a/commands/splash.c +++ b/commands/splash.c @@ -41,6 +41,8 @@ case 'y': s.y = simple_strtoul(optarg, NULL, 0); break; + default: + return COMMAND_ERROR_USAGE; } } diff --git a/commands/usb.c b/commands/usb.c index 48c6619..9a23aa2 100644 --- a/commands/usb.c +++ b/commands/usb.c @@ -123,6 +123,8 @@ case 's': show = 1; break; + default: + return COMMAND_ERROR_USAGE; } } diff --git a/commands/usbserial.c b/commands/usbserial.c index e80b315..ad6bc63 100644 --- a/commands/usbserial.c +++ b/commands/usbserial.c @@ -44,6 +44,8 @@ case 'd': usb_serial_unregister(); return 0; + default: + return COMMAND_ERROR_USAGE; } }