diff options
Diffstat (limited to 'rbutil')
-rw-r--r-- | rbutil/ipodpatcher/Makefile | 5 | ||||
-rw-r--r-- | rbutil/ipodpatcher/ipodio-posix.c | 2 | ||||
-rw-r--r-- | rbutil/ipodpatcher/ipodio-win32.c | 1 | ||||
-rw-r--r-- | rbutil/ipodpatcher/ipodpatcher.c | 2 | ||||
-rw-r--r-- | rbutil/ipodpatcher/main.c | 11 |
5 files changed, 8 insertions, 13 deletions
diff --git a/rbutil/ipodpatcher/Makefile b/rbutil/ipodpatcher/Makefile index df2838bf3c..34b4dd6b43 100644 --- a/rbutil/ipodpatcher/Makefile +++ b/rbutil/ipodpatcher/Makefile | |||
@@ -2,11 +2,14 @@ CFLAGS=-Wall -W | |||
2 | 2 | ||
3 | BOOT_H = ipod1g2g.h ipod3g.h ipod4g.h ipodcolor.h ipodmini1g.h ipodmini2g.h ipodnano1g.h ipodvideo.h | 3 | BOOT_H = ipod1g2g.h ipod3g.h ipod4g.h ipodcolor.h ipodmini1g.h ipodmini2g.h ipodnano1g.h ipodvideo.h |
4 | 4 | ||
5 | # Enable the next two lines to build with embedded bootloaders and the | 5 | # Build with "make BOOTOBJS=1" to build with embedded bootloaders and the |
6 | # --install option and interactive mode. You need the full set of Rockbox | 6 | # --install option and interactive mode. You need the full set of Rockbox |
7 | # bootloaders in this directory - download them from | 7 | # bootloaders in this directory - download them from |
8 | # http://download.rockbox.org/bootloader/ipod/bootloaders.zip | 8 | # http://download.rockbox.org/bootloader/ipod/bootloaders.zip |
9 | 9 | ||
10 | # Releases of ipodpatcher are created with "make RELEASE=1". This | ||
11 | # enables BOOTOBJS and uses the VERSION string defined in main.c | ||
12 | |||
10 | ifdef RELEASE | 13 | ifdef RELEASE |
11 | CFLAGS+=-DRELEASE | 14 | CFLAGS+=-DRELEASE |
12 | BOOTOBJS=1 | 15 | BOOTOBJS=1 |
diff --git a/rbutil/ipodpatcher/ipodio-posix.c b/rbutil/ipodpatcher/ipodio-posix.c index 065aae6303..e496fa39bc 100644 --- a/rbutil/ipodpatcher/ipodio-posix.c +++ b/rbutil/ipodpatcher/ipodio-posix.c | |||
@@ -185,7 +185,7 @@ int ipod_open(struct ipod_t* ipod, int silent) | |||
185 | /* Read information about the disk */ | 185 | /* Read information about the disk */ |
186 | 186 | ||
187 | if(ioctl(ipod->dh,IPOD_SECTORSIZE_IOCTL,&ipod->sector_size) < 0) { | 187 | if(ioctl(ipod->dh,IPOD_SECTORSIZE_IOCTL,&ipod->sector_size) < 0) { |
188 | ipod->sector_size=512; | 188 | ipod->sector_size=2048; |
189 | if (!silent) { | 189 | if (!silent) { |
190 | fprintf(stderr,"[ERR] ioctl() call to get sector size failed, defaulting to %d\n" | 190 | fprintf(stderr,"[ERR] ioctl() call to get sector size failed, defaulting to %d\n" |
191 | ,ipod->sector_size); | 191 | ,ipod->sector_size); |
diff --git a/rbutil/ipodpatcher/ipodio-win32.c b/rbutil/ipodpatcher/ipodio-win32.c index abf7bdf46e..eec065abb6 100644 --- a/rbutil/ipodpatcher/ipodio-win32.c +++ b/rbutil/ipodpatcher/ipodio-win32.c | |||
@@ -181,6 +181,7 @@ ssize_t ipod_read(struct ipod_t* ipod, unsigned char* buf, int nbytes) | |||
181 | { | 181 | { |
182 | unsigned long count; | 182 | unsigned long count; |
183 | 183 | ||
184 | printf("[DEBUG] ipod_read - nbytes=%d\n",nbytes); | ||
184 | if (!ReadFile(ipod->dh, buf, nbytes, &count, NULL)) { | 185 | if (!ReadFile(ipod->dh, buf, nbytes, &count, NULL)) { |
185 | ipod_print_error(" Error reading from disk: "); | 186 | ipod_print_error(" Error reading from disk: "); |
186 | return -1; | 187 | return -1; |
diff --git a/rbutil/ipodpatcher/ipodpatcher.c b/rbutil/ipodpatcher/ipodpatcher.c index b2f01b8223..a21ddbd0fd 100644 --- a/rbutil/ipodpatcher/ipodpatcher.c +++ b/rbutil/ipodpatcher/ipodpatcher.c | |||
@@ -2080,7 +2080,7 @@ static int find_key(struct ipod_t* ipod, int aupd, unsigned char* key) | |||
2080 | return -1; | 2080 | return -1; |
2081 | } | 2081 | } |
2082 | 2082 | ||
2083 | if ((n = ipod_read(ipod, ipod_sectorbuf, 512)) < 0) { | 2083 | if ((n = ipod_read(ipod, ipod_sectorbuf, ipod->sector_size)) < 0) { |
2084 | return -1; | 2084 | return -1; |
2085 | } | 2085 | } |
2086 | 2086 | ||
diff --git a/rbutil/ipodpatcher/main.c b/rbutil/ipodpatcher/main.c index 6ec05666ac..412c8733f9 100644 --- a/rbutil/ipodpatcher/main.c +++ b/rbutil/ipodpatcher/main.c | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | #ifdef RELEASE | 34 | #ifdef RELEASE |
35 | #undef VERSION | 35 | #undef VERSION |
36 | #define VERSION "4.0 with v3.0 bootloaders (v1.0 for 2nd Gen Nano)" | 36 | #define VERSION "4.1 with v3.0 bootloaders (v1.0 for 2nd Gen Nano)" |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | 39 | ||
@@ -398,15 +398,6 @@ int main(int argc, char* argv[]) | |||
398 | if (ipod.ramsize > 0) { printf("(%dMB RAM) ",ipod.ramsize); } | 398 | if (ipod.ramsize > 0) { printf("(%dMB RAM) ",ipod.ramsize); } |
399 | printf("(\"%s\")\n",ipod.macpod ? "macpod" : "winpod"); | 399 | printf("(\"%s\")\n",ipod.macpod ? "macpod" : "winpod"); |
400 | 400 | ||
401 | if (ipod.ipod_directory[ipod.ososimage].vers == 0x10000) { | ||
402 | fprintf(stderr,"[ERR] *** ipodpatcher does not support the 2nd Generation Nano! ***\n"); | ||
403 | #ifdef WITH_BOOTOBJS | ||
404 | printf("Press ENTER to exit ipodpatcher :"); | ||
405 | fgets(yesno,4,stdin); | ||
406 | #endif | ||
407 | return 0; | ||
408 | } | ||
409 | |||
410 | if (ipod.macpod) { | 401 | if (ipod.macpod) { |
411 | print_macpod_warning(); | 402 | print_macpod_warning(); |
412 | } | 403 | } |