From 53dac4877ed998c6dcc037b1bc72d236dd7e956a Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Thu, 5 Dec 2013 14:36:06 +0100 Subject: Print error if no command was supplied --- src/ideviceinstaller.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c index 59a6b38..04aa858 100644 --- a/src/ideviceinstaller.c +++ b/src/ideviceinstaller.c @@ -412,7 +412,11 @@ static void parse_opts(int argc, char **argv) } } - if (optind <= 1 || (argc - optind > 0)) { + if (cmd == CMD_NONE) { + printf("ERROR: No mode/operation was supplied.\n"); + } + + if (cmd == CMD_NONE || optind <= 1 || (argc - optind > 0)) { print_usage(argc, argv); exit(2); } -- cgit v1.1-32-gdbae