diff options
author | Joshua Hill | 2010-05-20 14:23:54 -0400 |
---|---|---|
committer | Joshua Hill | 2010-05-20 14:23:54 -0400 |
commit | c4477844178978ef36a607a911712ed4c9c6904a (patch) | |
tree | a26e9a4bff3e8bd4a769d100fe1ed81b38017a02 | |
parent | fdbdb9f9e964528d08038e51cd57f9545cef294a (diff) | |
download | libirecovery-c4477844178978ef36a607a911712ed4c9c6904a.tar.gz libirecovery-c4477844178978ef36a607a911712ed4c9c6904a.tar.bz2 |
A few minor changes so pod2g will quit yelling at me
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | src/libirecovery.c | 9 |
2 files changed, 13 insertions, 8 deletions
@@ -1,4 +1,4 @@ -all: static +all: @echo "Please choose either macosx, linux, or windows" static: @@ -18,6 +18,16 @@ macosx: windows: gcc -o libirecovery.dll -c src/libirecovery.c -I. -lusb-1.0 -lreadline -shared -fPIC gcc -o irecovery irecovery.c -I. -lirecovery -lreadline + +install: + cp libirecovery.so /usr/local/lib/libirecovery.so + cp include/libirecovery.h /usr/local/include/libirecovery.h + cp irecovery /usr/local/bin/irecovery + +uninstall: + rm -rf /usr/local/lib/libirecovery.so + rm -rf include/libirecovery.h /usr/local/include/libirecovery.h + rm -rf /usr/local/bin/irecovery clean: rm -rf irecovery libirecovery.o libirecovery.so libirecovery.a diff --git a/src/libirecovery.c b/src/libirecovery.c index 18097ee..0be16c6 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c @@ -332,7 +332,7 @@ irecv_error_t irecv_send_buffer(irecv_device_t* device, unsigned char* buffer, u unsigned int status = 0; for (i = 0; i < packets; i++) { int size = i + 1 < packets ? 0x800 : last; - int bytes = libusb_control_transfer(device->handle, 0x21, 1, i, 0, &buffer[i * 0x800], size, 1000); + int bytes = libusb_control_transfer(device->handle, 0x21, 1, 0, 0, &buffer[i * 0x800], size, 1000); if (bytes != size) { return IRECV_ERROR_USB_UPLOAD; } @@ -350,10 +350,7 @@ irecv_error_t irecv_send_buffer(irecv_device_t* device, unsigned char* buffer, u } - //char command[0x100]; - //memset(command, '\0', 0x100); - //snprintf(command, 0x100, "setenv filesize %d", length); - libusb_control_transfer(device->handle, 0x21, 1, i, 0, buffer, 0, 1000); + libusb_control_transfer(device->handle, 0x21, 1, 0, 0, buffer, 0, 1000); for (i = 0; i < 3; i++) { error = irecv_get_status(device, &status); if(error != IRECV_SUCCESS) { @@ -361,8 +358,6 @@ irecv_error_t irecv_send_buffer(irecv_device_t* device, unsigned char* buffer, u } } - //irecv_send_command(device, command); - return IRECV_SUCCESS; } |