summaryrefslogtreecommitdiff
path: root/uisimulator/common/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/common/io.c')
-rw-r--r--uisimulator/common/io.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/uisimulator/common/io.c b/uisimulator/common/io.c
index 822a43b63d..c44e050fc9 100644
--- a/uisimulator/common/io.c
+++ b/uisimulator/common/io.c
@@ -342,7 +342,7 @@ int sim_open(const char *name, int o)
342 { 342 {
343 snprintf(buffer, sizeof(buffer), "%s%s", get_sim_rootdir(), name); 343 snprintf(buffer, sizeof(buffer), "%s%s", get_sim_rootdir(), name);
344 344
345 debugf("We open the real file '%s'\n", buffer); 345 //debugf("We open the real file '%s'\n", buffer);
346 if (num_openfiles < MAX_OPEN_FILES) 346 if (num_openfiles < MAX_OPEN_FILES)
347 { 347 {
348 ret = OPEN(buffer, opts, 0666); 348 ret = OPEN(buffer, opts, 0666);
@@ -380,7 +380,7 @@ int sim_creat(const char *name)
380 { 380 {
381 snprintf(buffer, sizeof(buffer), "%s%s", get_sim_rootdir(), name); 381 snprintf(buffer, sizeof(buffer), "%s%s", get_sim_rootdir(), name);
382 382
383 debugf("We create the real file '%s'\n", buffer); 383 //debugf("We create the real file '%s'\n", buffer);
384 return OPEN(buffer, O_BINARY | O_WRONLY | O_CREAT | O_TRUNC, 0666); 384 return OPEN(buffer, O_BINARY | O_WRONLY | O_CREAT | O_TRUNC, 0666);
385 } 385 }
386 fprintf(stderr, "WARNING, bad file name lacks slash: %s\n", name); 386 fprintf(stderr, "WARNING, bad file name lacks slash: %s\n", name);
@@ -434,7 +434,7 @@ int sim_mkdir(const char *name)
434 434
435 snprintf(buffer, sizeof(buffer), "%s%s", get_sim_rootdir(), name); 435 snprintf(buffer, sizeof(buffer), "%s%s", get_sim_rootdir(), name);
436 436
437 debugf("We create the real directory '%s'\n", buffer); 437 //debugf("We create the real directory '%s'\n", buffer);
438 return MKDIR(buffer, 0777); 438 return MKDIR(buffer, 0777);
439#endif 439#endif
440} 440}
@@ -449,7 +449,7 @@ int sim_rmdir(const char *name)
449 { 449 {
450 snprintf(buffer, sizeof(buffer), "%s%s", get_sim_rootdir(), name); 450 snprintf(buffer, sizeof(buffer), "%s%s", get_sim_rootdir(), name);
451 451
452 debugf("We remove the real directory '%s'\n", buffer); 452 //debugf("We remove the real directory '%s'\n", buffer);
453 return RMDIR(buffer); 453 return RMDIR(buffer);
454 } 454 }
455 return RMDIR(name); 455 return RMDIR(name);
@@ -470,7 +470,7 @@ int sim_remove(const char *name)
470 if(name[0] == '/') { 470 if(name[0] == '/') {
471 snprintf(buffer, sizeof(buffer), "%s%s", get_sim_rootdir(), name); 471 snprintf(buffer, sizeof(buffer), "%s%s", get_sim_rootdir(), name);
472 472
473 debugf("We remove the real file '%s'\n", buffer); 473 //debugf("We remove the real file '%s'\n", buffer);
474 return REMOVE(buffer); 474 return REMOVE(buffer);
475 } 475 }
476 return REMOVE(name); 476 return REMOVE(name);
@@ -495,7 +495,7 @@ int sim_rename(const char *oldpath, const char* newpath)
495 snprintf(buffer2, sizeof(buffer2), "%s%s", get_sim_rootdir(), 495 snprintf(buffer2, sizeof(buffer2), "%s%s", get_sim_rootdir(),
496 newpath); 496 newpath);
497 497
498 debugf("We rename the real file '%s' to '%s'\n", buffer1, buffer2); 498 //debugf("We rename the real file '%s' to '%s'\n", buffer1, buffer2);
499 return RENAME(buffer1, buffer2); 499 return RENAME(buffer1, buffer2);
500 } 500 }
501 return -1; 501 return -1;
@@ -526,8 +526,7 @@ void fat_size(IF_MV2(int volume,) unsigned long* size, unsigned long* free)
526{ 526{
527#ifdef HAVE_MULTIVOLUME 527#ifdef HAVE_MULTIVOLUME
528 if (volume != 0) { 528 if (volume != 0) {
529 debugf("io.c: fat_size(volume=%d); simulator only supports volume 0\n", 529 //debugf("io.c: fat_size(volume=%d); simulator only supports volume 0\n",volume);
530 volume);
531 530
532 if (size) *size = 0; 531 if (size) *size = 0;
533 if (free) *free = 0; 532 if (free) *free = 0;