diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/calendar.c | 4 | ||||
-rw-r--r-- | apps/plugins/clock.c | 2 | ||||
-rw-r--r-- | apps/plugins/iriverify.c | 2 | ||||
-rw-r--r-- | apps/plugins/lib/bmp.c | 2 | ||||
-rw-r--r-- | apps/plugins/lib/configfile.c | 2 | ||||
-rw-r--r-- | apps/plugins/search.c | 2 | ||||
-rw-r--r-- | apps/plugins/sort.c | 2 | ||||
-rw-r--r-- | apps/plugins/test_disk.c | 4 | ||||
-rw-r--r-- | apps/plugins/vbrfix.c | 2 | ||||
-rw-r--r-- | apps/plugins/viewer.c | 6 | ||||
-rw-r--r-- | apps/plugins/vu_meter.c | 2 | ||||
-rw-r--r-- | apps/plugins/wav2wv.c | 2 | ||||
-rw-r--r-- | apps/plugins/zxbox/snapshot.c | 2 |
13 files changed, 17 insertions, 17 deletions
diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c index a57cadedd2..34af4746a9 100644 --- a/apps/plugins/calendar.c +++ b/apps/plugins/calendar.c | |||
@@ -316,7 +316,7 @@ static bool save_memo(int changed, bool new_mod, struct shown *shown) | |||
316 | { | 316 | { |
317 | int fp,fq; | 317 | int fp,fq; |
318 | fp = rb->open("/.rockbox/.memo",O_RDONLY | O_CREAT); | 318 | fp = rb->open("/.rockbox/.memo",O_RDONLY | O_CREAT); |
319 | fq = rb->creat("/.rockbox/~temp", O_WRONLY); | 319 | fq = rb->creat("/.rockbox/~temp"); |
320 | if ( (fq != -1) && (fp != -1) ) | 320 | if ( (fq != -1) && (fp != -1) ) |
321 | { | 321 | { |
322 | int i; | 322 | int i; |
@@ -345,7 +345,7 @@ static bool save_memo(int changed, bool new_mod, struct shown *shown) | |||
345 | rb->write(fq,temp,1); | 345 | rb->write(fq,temp,1); |
346 | } | 346 | } |
347 | rb->close(fp); | 347 | rb->close(fp); |
348 | fp = rb->creat("/.rockbox/.memo", O_WRONLY); | 348 | fp = rb->creat("/.rockbox/.memo"); |
349 | rb->lseek(fp, 0, SEEK_SET); | 349 | rb->lseek(fp, 0, SEEK_SET); |
350 | rb->lseek(fq, 0, SEEK_SET); | 350 | rb->lseek(fq, 0, SEEK_SET); |
351 | for (i = 0; i < rb->filesize(fq); i++) | 351 | for (i = 0; i < rb->filesize(fq); i++) |
diff --git a/apps/plugins/clock.c b/apps/plugins/clock.c index 28cd223795..19c7dac4aa 100644 --- a/apps/plugins/clock.c +++ b/apps/plugins/clock.c | |||
@@ -903,7 +903,7 @@ void save_settings(bool interface) | |||
903 | rb->lcd_update(); | 903 | rb->lcd_update(); |
904 | } | 904 | } |
905 | 905 | ||
906 | fd = rb->creat(default_filename, O_WRONLY); /* create the settings file */ | 906 | fd = rb->creat(default_filename); /* create the settings file */ |
907 | 907 | ||
908 | if(fd >= 0) /* file exists, save successful */ | 908 | if(fd >= 0) /* file exists, save successful */ |
909 | { | 909 | { |
diff --git a/apps/plugins/iriverify.c b/apps/plugins/iriverify.c index 47cb385f0f..555c9200e3 100644 --- a/apps/plugins/iriverify.c +++ b/apps/plugins/iriverify.c | |||
@@ -67,7 +67,7 @@ static int write_file(void) | |||
67 | 67 | ||
68 | rb->snprintf(tmpfilename, MAX_PATH+1, "%s.tmp", filename); | 68 | rb->snprintf(tmpfilename, MAX_PATH+1, "%s.tmp", filename); |
69 | 69 | ||
70 | fd = rb->creat(tmpfilename, O_WRONLY); | 70 | fd = rb->creat(tmpfilename); |
71 | if(fd < 0) | 71 | if(fd < 0) |
72 | return 10 * fd - 1; | 72 | return 10 * fd - 1; |
73 | 73 | ||
diff --git a/apps/plugins/lib/bmp.c b/apps/plugins/lib/bmp.c index 18968af7c1..dc8432f76a 100644 --- a/apps/plugins/lib/bmp.c +++ b/apps/plugins/lib/bmp.c | |||
@@ -56,7 +56,7 @@ int save_bmp_file( char* filename, struct bitmap *bm, struct plugin_api* rb ) | |||
56 | int fh; | 56 | int fh; |
57 | int x,y; | 57 | int x,y; |
58 | if( bm->format != FORMAT_NATIVE ) return -1; | 58 | if( bm->format != FORMAT_NATIVE ) return -1; |
59 | fh = rb->PREFIX(creat)( filename, O_WRONLY ); | 59 | fh = rb->creat( filename ); |
60 | if( fh < 0 ) return -1; | 60 | if( fh < 0 ) return -1; |
61 | 61 | ||
62 | rb->write( fh, header, sizeof( header ) ); | 62 | rb->write( fh, header, sizeof( header ) ); |
diff --git a/apps/plugins/lib/configfile.c b/apps/plugins/lib/configfile.c index d5b60bcfbc..3ca38052e5 100644 --- a/apps/plugins/lib/configfile.c +++ b/apps/plugins/lib/configfile.c | |||
@@ -34,7 +34,7 @@ int configfile_save(const char *filename, struct configdata *cfg, | |||
34 | char buf[MAX_PATH]; | 34 | char buf[MAX_PATH]; |
35 | 35 | ||
36 | cfg_rb->snprintf(buf, MAX_PATH, "/.rockbox/rocks/%s", filename); | 36 | cfg_rb->snprintf(buf, MAX_PATH, "/.rockbox/rocks/%s", filename); |
37 | fd = cfg_rb->creat(buf, O_WRONLY); | 37 | fd = cfg_rb->creat(buf); |
38 | if(fd < 0) | 38 | if(fd < 0) |
39 | return fd*10 - 1; | 39 | return fd*10 - 1; |
40 | 40 | ||
diff --git a/apps/plugins/search.c b/apps/plugins/search.c index c174abfd24..5a30ce6064 100644 --- a/apps/plugins/search.c +++ b/apps/plugins/search.c | |||
@@ -126,7 +126,7 @@ static bool search_init(char* file) | |||
126 | if (fd==-1) | 126 | if (fd==-1) |
127 | return false; | 127 | return false; |
128 | 128 | ||
129 | fdw = rb->creat(resultfile, O_WRONLY); | 129 | fdw = rb->creat(resultfile); |
130 | 130 | ||
131 | if (fdw < 0) { | 131 | if (fdw < 0) { |
132 | #ifdef HAVE_LCD_BITMAP | 132 | #ifdef HAVE_LCD_BITMAP |
diff --git a/apps/plugins/sort.c b/apps/plugins/sort.c index 77342f33e9..80ef22fa44 100644 --- a/apps/plugins/sort.c +++ b/apps/plugins/sort.c | |||
@@ -140,7 +140,7 @@ static int write_file(void) | |||
140 | 140 | ||
141 | /* Create a temporary file */ | 141 | /* Create a temporary file */ |
142 | rb->snprintf(tmpfilename, MAX_PATH+1, "%s.tmp", filename); | 142 | rb->snprintf(tmpfilename, MAX_PATH+1, "%s.tmp", filename); |
143 | fd = rb->creat(tmpfilename, O_WRONLY); | 143 | fd = rb->creat(tmpfilename); |
144 | if(fd < 0) | 144 | if(fd < 0) |
145 | return 10 * fd - 1; | 145 | return 10 * fd - 1; |
146 | 146 | ||
diff --git a/apps/plugins/test_disk.c b/apps/plugins/test_disk.c index 3292cfa930..edc1dfbddb 100644 --- a/apps/plugins/test_disk.c +++ b/apps/plugins/test_disk.c | |||
@@ -102,7 +102,7 @@ static bool test_fs(void) | |||
102 | rb->snprintf(text_buf, sizeof text_buf, "FS stress test: %dKB", (TEST_SIZE>>10)); | 102 | rb->snprintf(text_buf, sizeof text_buf, "FS stress test: %dKB", (TEST_SIZE>>10)); |
103 | log_lcd(text_buf, true); | 103 | log_lcd(text_buf, true); |
104 | 104 | ||
105 | fd = rb->creat(TEST_FILE, 0); | 105 | fd = rb->creat(TEST_FILE); |
106 | if (fd < 0) | 106 | if (fd < 0) |
107 | { | 107 | { |
108 | rb->splash(0, true, "Couldn't create testfile."); | 108 | rb->splash(0, true, "Couldn't create testfile."); |
@@ -193,7 +193,7 @@ static bool test_speed(void) | |||
193 | log_init(); | 193 | log_init(); |
194 | log_lcd("Disk speed test", true); | 194 | log_lcd("Disk speed test", true); |
195 | 195 | ||
196 | fd = rb->creat(TEST_FILE, 0); | 196 | fd = rb->creat(TEST_FILE); |
197 | if (fd < 0) | 197 | if (fd < 0) |
198 | { | 198 | { |
199 | rb->splash(0, true, "Couldn't create testfile."); | 199 | rb->splash(0, true, "Couldn't create testfile."); |
diff --git a/apps/plugins/vbrfix.c b/apps/plugins/vbrfix.c index d05419f19c..9bdaf493f9 100644 --- a/apps/plugins/vbrfix.c +++ b/apps/plugins/vbrfix.c | |||
@@ -50,7 +50,7 @@ static int insert_data_in_file(char *fname, int fpos, char *buf, int num_bytes) | |||
50 | return 10*orig_fd - 1; | 50 | return 10*orig_fd - 1; |
51 | } | 51 | } |
52 | 52 | ||
53 | fd = rb->creat(tmpname, O_WRONLY); | 53 | fd = rb->creat(tmpname); |
54 | if(fd < 0) { | 54 | if(fd < 0) { |
55 | rb->close(orig_fd); | 55 | rb->close(orig_fd); |
56 | return 10*fd - 2; | 56 | return 10*fd - 2; |
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c index a8ef5eb1e8..8590283c57 100644 --- a/apps/plugins/viewer.c +++ b/apps/plugins/viewer.c | |||
@@ -1074,7 +1074,7 @@ static void viewer_load_settings(void) /* same name as global, but not the same | |||
1074 | if (i < data->bookmarked_files_count) | 1074 | if (i < data->bookmarked_files_count) |
1075 | { | 1075 | { |
1076 | /* it is in the list, write everything back in the correct order, and reload the file correctly */ | 1076 | /* it is in the list, write everything back in the correct order, and reload the file correctly */ |
1077 | settings_fd = rb->creat(BOOKMARKS_FILE, O_WRONLY); | 1077 | settings_fd = rb->creat(BOOKMARKS_FILE); |
1078 | if (settings_fd >=0 ) | 1078 | if (settings_fd >=0 ) |
1079 | { | 1079 | { |
1080 | if (data->bookmarked_files_count > MAX_BOOKMARKED_FILES) | 1080 | if (data->bookmarked_files_count > MAX_BOOKMARKED_FILES) |
@@ -1092,7 +1092,7 @@ static void viewer_load_settings(void) /* same name as global, but not the same | |||
1092 | } | 1092 | } |
1093 | else /* not in list, write the list to the file */ | 1093 | else /* not in list, write the list to the file */ |
1094 | { | 1094 | { |
1095 | settings_fd = rb->creat(BOOKMARKS_FILE, O_WRONLY); | 1095 | settings_fd = rb->creat(BOOKMARKS_FILE); |
1096 | if (settings_fd >=0 ) | 1096 | if (settings_fd >=0 ) |
1097 | { | 1097 | { |
1098 | if (++(data->bookmarked_files_count) > MAX_BOOKMARKED_FILES) | 1098 | if (++(data->bookmarked_files_count) > MAX_BOOKMARKED_FILES) |
@@ -1120,7 +1120,7 @@ static void viewer_load_settings(void) /* same name as global, but not the same | |||
1120 | static void viewer_save_settings(void)/* same name as global, but not the same file.. */ | 1120 | static void viewer_save_settings(void)/* same name as global, but not the same file.. */ |
1121 | { | 1121 | { |
1122 | int settings_fd; | 1122 | int settings_fd; |
1123 | settings_fd = rb->creat(SETTINGS_FILE, O_WRONLY); /* create the settings file */ | 1123 | settings_fd = rb->creat(SETTINGS_FILE); /* create the settings file */ |
1124 | 1124 | ||
1125 | rb->write (settings_fd, &prefs, sizeof(struct preferences)); | 1125 | rb->write (settings_fd, &prefs, sizeof(struct preferences)); |
1126 | rb->close(settings_fd); | 1126 | rb->close(settings_fd); |
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c index cbfc0ee5b8..4a68088270 100644 --- a/apps/plugins/vu_meter.c +++ b/apps/plugins/vu_meter.c | |||
@@ -335,7 +335,7 @@ void load_settings(void) { | |||
335 | } | 335 | } |
336 | 336 | ||
337 | void save_settings(void) { | 337 | void save_settings(void) { |
338 | int fp = rb->creat("/.rockbox/rocks/.vu_meter", O_WRONLY); | 338 | int fp = rb->creat("/.rockbox/rocks/.vu_meter"); |
339 | if(fp >= 0) { | 339 | if(fp >= 0) { |
340 | rb->write (fp, &settings, sizeof(struct saved_settings)); | 340 | rb->write (fp, &settings, sizeof(struct saved_settings)); |
341 | rb->close(fp); | 341 | rb->close(fp); |
diff --git a/apps/plugins/wav2wv.c b/apps/plugins/wav2wv.c index 5b71e7e759..2e2076c0ed 100644 --- a/apps/plugins/wav2wv.c +++ b/apps/plugins/wav2wv.c | |||
@@ -174,7 +174,7 @@ static int wav2wv (char *filename) | |||
174 | extension [1] = extension [2]; | 174 | extension [1] = extension [2]; |
175 | extension [2] = 0; | 175 | extension [2] = 0; |
176 | 176 | ||
177 | out_fd = rb->creat (filename, O_WRONLY); | 177 | out_fd = rb->creat (filename); |
178 | 178 | ||
179 | extension [2] = extension [1]; | 179 | extension [2] = extension [1]; |
180 | extension [1] = save_a; | 180 | extension [1] = save_a; |
diff --git a/apps/plugins/zxbox/snapshot.c b/apps/plugins/zxbox/snapshot.c index c67b7a8f39..d89e533d9e 100644 --- a/apps/plugins/zxbox/snapshot.c +++ b/apps/plugins/zxbox/snapshot.c | |||
@@ -586,7 +586,7 @@ static void save_snapshot_file_type(char *name, int type) | |||
586 | int snsh; | 586 | int snsh; |
587 | snsh = rb->open(name, O_WRONLY); | 587 | snsh = rb->open(name, O_WRONLY); |
588 | if(snsh < 0) { | 588 | if(snsh < 0) { |
589 | snsh = rb->creat(name, O_WRONLY); | 589 | snsh = rb->creat(name); |
590 | if(snsh < 0) { | 590 | if(snsh < 0) { |
591 | put_msg("Could not create snapshot file"); | 591 | put_msg("Could not create snapshot file"); |
592 | return; | 592 | return; |