diff mbox

Drop usage if a command line is not recognized

Message ID 20201110130521.76549-1-sbabic@denx.de
State Accepted
Headers show

Commit Message

Stefano Babic Nov. 10, 2020, 1:05 p.m. UTC
Do not wirte the full log if a command is not recognized because it is
confusing. Just report that command is unknown and suggest to run the -h
option.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 core/swupdate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/core/swupdate.c b/core/swupdate.c
index 2135edd..6eaa588 100644
--- a/core/swupdate.c
+++ b/core/swupdate.c
@@ -892,7 +892,7 @@  int main(int argc, char **argv)
 				sizeof(swcfg.globals.preupdatecmd));
 			break;
 		default:
-			usage(argv[0]);
+			fprintf(stdout, "Try %s -h for usage\n", argv[0]);
 			exit(EXIT_FAILURE);
 			break;
 		}