diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2012-12-23 23:30:57 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2013-01-01 15:05:52 +0100 |
commit | 24e37ddf57bac6a1c9786d50abbe3a1982930382 (patch) | |
tree | b34ae751986f185f51556a040f388025cac4c383 /rbutil/ipodpatcher/ipodio.h | |
parent | 6803d7b10cd9651ded08674f1597d4511cabb7af (diff) | |
download | rockbox-24e37ddf57bac6a1c9786d50abbe3a1982930382.tar.gz rockbox-24e37ddf57bac6a1c9786d50abbe3a1982930382.zip |
ipodpatcher: move sectorbuf pointer into ipod_t structure.
The ipod_t structure holds all relevant information for ipodpatcher. Put the
global ipod_sectorbuf pointer into it as well. Allows the Rockbox Utility Ipod
class to be instanciated multiple times since each instance can now have its
own buffer.
Change-Id: Ie319cbadbc20c367ceadba9a46b4dc34b57a79a7
Diffstat (limited to 'rbutil/ipodpatcher/ipodio.h')
-rw-r--r-- | rbutil/ipodpatcher/ipodio.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/rbutil/ipodpatcher/ipodio.h b/rbutil/ipodpatcher/ipodio.h index e08d74a785..8a2f06cf20 100644 --- a/rbutil/ipodpatcher/ipodio.h +++ b/rbutil/ipodpatcher/ipodio.h | |||
@@ -70,6 +70,7 @@ struct partinfo_t { | |||
70 | }; | 70 | }; |
71 | 71 | ||
72 | struct ipod_t { | 72 | struct ipod_t { |
73 | unsigned char* sectorbuf; | ||
73 | HANDLE dh; | 74 | HANDLE dh; |
74 | char diskname[4096]; | 75 | char diskname[4096]; |
75 | int sector_size; | 76 | int sector_size; |
@@ -103,9 +104,9 @@ int ipod_close(struct ipod_t* ipod); | |||
103 | int ipod_seek(struct ipod_t* ipod, unsigned long pos); | 104 | int ipod_seek(struct ipod_t* ipod, unsigned long pos); |
104 | int ipod_scsi_inquiry(struct ipod_t* ipod, int page_code, | 105 | int ipod_scsi_inquiry(struct ipod_t* ipod, int page_code, |
105 | unsigned char* buf, int bufsize); | 106 | unsigned char* buf, int bufsize); |
106 | ssize_t ipod_read(struct ipod_t* ipod, unsigned char* buf, int nbytes); | 107 | ssize_t ipod_read(struct ipod_t* ipod, int nbytes); |
107 | ssize_t ipod_write(struct ipod_t* ipod, unsigned char* buf, int nbytes); | 108 | ssize_t ipod_write(struct ipod_t* ipod, int nbytes); |
108 | int ipod_alloc_buffer(unsigned char** sectorbuf, int bufsize); | 109 | int ipod_alloc_buffer(struct ipod_t* ipod, int bufsize); |
109 | 110 | ||
110 | /* In fat32format.c */ | 111 | /* In fat32format.c */ |
111 | int format_partition(struct ipod_t* ipod, int partition); | 112 | int format_partition(struct ipod_t* ipod, int partition); |