Print error if user attempts to supply multiple command arguments
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c
index 5758b46..59a6b38 100644
--- a/src/ideviceinstaller.c
+++ b/src/ideviceinstaller.c
@@ -330,6 +330,25 @@
 			break;
 		}
 
+		/* verify if multiple modes have been supplied */
+		switch (c) {
+		case 'l':
+		case 'i':
+		case 'g':
+		case 'L':
+		case 'a':
+		case 'r':
+		case 'R':
+			if (cmd != CMD_NONE) {
+				printf("ERROR: A mode has already been supplied. Multiple modes are not supported.\n");
+				print_usage(argc, argv);
+				exit(2);
+			}
+			break;
+		default:
+			break;
+		}
+
 		switch (c) {
 		case 'h':
 			print_usage(argc, argv);