From 24e37ddf57bac6a1c9786d50abbe3a1982930382 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sun, 23 Dec 2012 23:30:57 +0100 Subject: 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 --- rbutil/ipodpatcher/ipodio.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'rbutil/ipodpatcher/ipodio.h') 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 { }; struct ipod_t { + unsigned char* sectorbuf; HANDLE dh; char diskname[4096]; int sector_size; @@ -103,9 +104,9 @@ int ipod_close(struct ipod_t* ipod); int ipod_seek(struct ipod_t* ipod, unsigned long pos); int ipod_scsi_inquiry(struct ipod_t* ipod, int page_code, unsigned char* buf, int bufsize); -ssize_t ipod_read(struct ipod_t* ipod, unsigned char* buf, int nbytes); -ssize_t ipod_write(struct ipod_t* ipod, unsigned char* buf, int nbytes); -int ipod_alloc_buffer(unsigned char** sectorbuf, int bufsize); +ssize_t ipod_read(struct ipod_t* ipod, int nbytes); +ssize_t ipod_write(struct ipod_t* ipod, int nbytes); +int ipod_alloc_buffer(struct ipod_t* ipod, int bufsize); /* In fat32format.c */ int format_partition(struct ipod_t* ipod, int partition); -- cgit v1.2.3