diff options
| author | 2013-12-02 20:49:49 +0100 | |
|---|---|---|
| committer | 2013-12-02 20:49:49 +0100 | |
| commit | 22973c90b089a15b1682ebfefc5cbf1560219ef2 (patch) | |
| tree | db32778e5244bfc03099c3f6d9e7da870df62748 /tools | |
| parent | 380447da66ee832d54bea97c37d0ae8e9f8b68a7 (diff) | |
| download | libirecovery-22973c90b089a15b1682ebfefc5cbf1560219ef2.tar.gz libirecovery-22973c90b089a15b1682ebfefc5cbf1560219ef2.tar.bz2 | |
irecovery: print a message if an unsupported command is entered in interactive mode
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/irecovery.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/irecovery.c b/tools/irecovery.c index a14e2b6..f3f7f39 100644 --- a/tools/irecovery.c +++ b/tools/irecovery.c | |||
| @@ -125,7 +125,7 @@ static void parse_command(irecv_client_t client, unsigned char* command, unsigne | |||
| 125 | shell_usage(); | 125 | shell_usage(); |
| 126 | } else if (!strcmp(cmd, "/upload")) { | 126 | } else if (!strcmp(cmd, "/upload")) { |
| 127 | char* filename = strtok(NULL, " "); | 127 | char* filename = strtok(NULL, " "); |
| 128 | debug("Uploading files %s\n", filename); | 128 | debug("Uploading file %s\n", filename); |
| 129 | if (filename != NULL) { | 129 | if (filename != NULL) { |
| 130 | irecv_send_file(client, filename, 0); | 130 | irecv_send_file(client, filename, 0); |
| 131 | } | 131 | } |
| @@ -174,6 +174,8 @@ static void parse_command(irecv_client_t client, unsigned char* command, unsigne | |||
| 174 | printf("Could not read file '%s'\n", filename); | 174 | printf("Could not read file '%s'\n", filename); |
| 175 | } | 175 | } |
| 176 | } | 176 | } |
| 177 | } else { | ||
| 178 | printf("Unsupported command %s. Use /help to get a list of available commands.\n", cmd); | ||
| 177 | } | 179 | } |
| 178 | 180 | ||
| 179 | free(action); | 181 | free(action); |
