summaryrefslogtreecommitdiffstats
path: root/src/ideviceinstaller.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-12-05 14:36:06 +0100
committerGravatar Martin Szulecki2013-12-05 14:36:06 +0100
commit53dac4877ed998c6dcc037b1bc72d236dd7e956a (patch)
treeb911bb1784c6a439f3a5862e95273728bebb518d /src/ideviceinstaller.c
parent140f9bbcde006dbada78c97f98e5cc8ccb93e788 (diff)
downloadideviceinstaller-53dac4877ed998c6dcc037b1bc72d236dd7e956a.tar.gz
ideviceinstaller-53dac4877ed998c6dcc037b1bc72d236dd7e956a.tar.bz2
Print error if no command was supplied
Diffstat (limited to 'src/ideviceinstaller.c')
-rw-r--r--src/ideviceinstaller.c6
1 files changed, 5 insertions, 1 deletions
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);
}