summaryrefslogtreecommitdiff
path: root/uisimulator/common/stubs.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/common/stubs.c')
-rw-r--r--uisimulator/common/stubs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c
index 6237caf949..a8ee5fb5ff 100644
--- a/uisimulator/common/stubs.c
+++ b/uisimulator/common/stubs.c
@@ -192,7 +192,7 @@ int storage_write_sectors(IF_MV2(int drive,)
192 fclose(f); 192 fclose(f);
193 } 193 }
194 } 194 }
195 return 1; 195 return 0;
196} 196}
197 197
198int storage_read_sectors(IF_MV2(int drive,) 198int storage_read_sectors(IF_MV2(int drive,)
@@ -202,6 +202,7 @@ int storage_read_sectors(IF_MV2(int drive,)
202{ 202{
203 IF_MV((void)drive;) 203 IF_MV((void)drive;)
204 int i; 204 int i;
205 size_t ret;
205 206
206 for (i=0; i<count; i++ ) { 207 for (i=0; i<count; i++ ) {
207 FILE* f; 208 FILE* f;
@@ -211,11 +212,13 @@ int storage_read_sectors(IF_MV2(int drive,)
211 sprintf(name,"sector%lX.bin",start+i); 212 sprintf(name,"sector%lX.bin",start+i);
212 f=fopen(name,"rb"); 213 f=fopen(name,"rb");
213 if (f) { 214 if (f) {
214 (void)fread(buf,512,1,f); 215 ret = fread(buf,512,1,f);
215 fclose(f); 216 fclose(f);
217 if (ret != 512)
218 return -1;
216 } 219 }
217 } 220 }
218 return 1; 221 return 0;
219} 222}
220 223
221void storage_spin(void) 224void storage_spin(void)