summaryrefslogtreecommitdiffstats
path: root/src/irecovery.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irecovery.c')
-rw-r--r--src/irecovery.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/irecovery.c b/src/irecovery.c
index 51320a5..3091319 100644
--- a/src/irecovery.c
+++ b/src/irecovery.c
@@ -22,7 +22,7 @@
22#include <libirecovery.h> 22#include <libirecovery.h>
23 23
24enum { 24enum {
25 kResetDevice, kSendCommand 25 kResetDevice, kSendCommand, kSendFile
26}; 26};
27 27
28void print_usage() { 28void print_usage() {
@@ -51,8 +51,13 @@ int main(int argc, char** argv) {
51 break; 51 break;
52 52
53 case 'c': 53 case 'c':
54 argument = optarg;
55 action = kSendCommand; 54 action = kSendCommand;
55 argument = optarg;
56 break;
57
58 case 'f':
59 action = kSendFile;
60 argument = optarg;
56 break; 61 break;
57 62
58 default: 63 default:
@@ -77,8 +82,12 @@ int main(int argc, char** argv) {
77 irecv_reset(device); 82 irecv_reset(device);
78 break; 83 break;
79 84
85 case kSendFile:
86 irecv_send_file(device, argument);
87 break;
88
80 case kSendCommand: 89 case kSendCommand:
81 irecv_command(device, argument); 90 irecv_send_command(device, argument);
82 break; 91 break;
83 92
84 default: 93 default: