summaryrefslogtreecommitdiffstats
path: root/src/irecovery.c
diff options
context:
space:
mode:
authorGravatar Joshua Hill2010-05-13 15:10:40 -0400
committerGravatar Joshua Hill2010-05-13 15:10:40 -0400
commita814b04770dc83774cd705d2fc8993f24e504a01 (patch)
tree3354669aab557d16eea95373538152c311142ca4 /src/irecovery.c
parent520c99d33e18009660f30bd38b31a2f1cd432fe6 (diff)
downloadlibirecovery-a814b04770dc83774cd705d2fc8993f24e504a01.tar.gz
libirecovery-a814b04770dc83774cd705d2fc8993f24e504a01.tar.bz2
Implemented irecv_get_status() to return current iphone usb "state".
Implemented irecv_send_buffer() to upload a buffer to the device load address. Implemented irecv_send_file() to read a file into memory and pass the buffer into irecv_send_buffer()
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 @@
#include <libirecovery.h>
enum {
- kResetDevice, kSendCommand
+ kResetDevice, kSendCommand, kSendFile
};
void print_usage() {
@@ -51,8 +51,13 @@ int main(int argc, char** argv) {
break;
case 'c':
- argument = optarg;
action = kSendCommand;
+ argument = optarg;
+ break;
+
+ case 'f':
+ action = kSendFile;
+ argument = optarg;
break;
default:
@@ -77,8 +82,12 @@ int main(int argc, char** argv) {
irecv_reset(device);
break;
+ case kSendFile:
+ irecv_send_file(device, argument);
+ break;
+
case kSendCommand:
- irecv_command(device, argument);
+ irecv_send_command(device, argument);
break;
default: