diff options
Diffstat (limited to 'rbutil/sansapatcher/sansaio-posix.c')
-rw-r--r-- | rbutil/sansapatcher/sansaio-posix.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/rbutil/sansapatcher/sansaio-posix.c b/rbutil/sansapatcher/sansaio-posix.c index cb169ce309..d173fbc300 100644 --- a/rbutil/sansapatcher/sansaio-posix.c +++ b/rbutil/sansapatcher/sansaio-posix.c | |||
@@ -113,10 +113,10 @@ int sansa_close(struct sansa_t* sansa) | |||
113 | return 0; | 113 | return 0; |
114 | } | 114 | } |
115 | 115 | ||
116 | int sansa_alloc_buffer(unsigned char** sectorbuf, int bufsize) | 116 | int sansa_alloc_buffer(struct sansa_t *sansa, int bufsize) |
117 | { | 117 | { |
118 | *sectorbuf=malloc(bufsize); | 118 | sansa->sectorbuf=malloc(bufsize); |
119 | if (*sectorbuf == NULL) { | 119 | if (sansa->sectorbuf == NULL) { |
120 | return -1; | 120 | return -1; |
121 | } | 121 | } |
122 | return 0; | 122 | return 0; |
@@ -139,9 +139,9 @@ int sansa_read(struct sansa_t* sansa, unsigned char* buf, int nbytes) | |||
139 | return read(sansa->dh, buf, nbytes); | 139 | return read(sansa->dh, buf, nbytes); |
140 | } | 140 | } |
141 | 141 | ||
142 | int sansa_write(struct sansa_t* sansa, unsigned char* buf, int nbytes) | 142 | int sansa_write(struct sansa_t* sansa, int nbytes) |
143 | { | 143 | { |
144 | return write(sansa->dh, buf, nbytes); | 144 | return write(sansa->dh, sansa->sectorbuf, nbytes); |
145 | } | 145 | } |
146 | #endif | 146 | #endif |
147 | 147 | ||