diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/calendar.c | 2 | ||||
-rw-r--r-- | apps/plugins/clock/clock_settings.c | 2 | ||||
-rw-r--r-- | apps/plugins/disktidy.c | 2 | ||||
-rw-r--r-- | apps/plugins/goban/util.c | 2 | ||||
-rw-r--r-- | apps/plugins/iriverify.c | 2 | ||||
-rw-r--r-- | apps/plugins/lib/configfile.c | 2 | ||||
-rw-r--r-- | apps/plugins/lib/pluginlib_bmp.c | 2 | ||||
-rw-r--r-- | apps/plugins/pictureflow/pictureflow.c | 2 | ||||
-rw-r--r-- | apps/plugins/pitch_detector.c | 2 | ||||
-rw-r--r-- | apps/plugins/random_folder_advance_config.c | 4 | ||||
-rw-r--r-- | apps/plugins/shortcuts/shortcuts_common.c | 2 | ||||
-rw-r--r-- | apps/plugins/test_codec.c | 2 | ||||
-rw-r--r-- | apps/plugins/test_disk.c | 6 | ||||
-rw-r--r-- | apps/plugins/vbrfix.c | 2 | ||||
-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 |
17 files changed, 20 insertions, 20 deletions
diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c index d6a1a9a4ac..3589998e47 100644 --- a/apps/plugins/calendar.c +++ b/apps/plugins/calendar.c | |||
@@ -612,7 +612,7 @@ static bool save_memo(int changed, bool new_mod, struct shown *shown) | |||
612 | int fp, fq; | 612 | int fp, fq; |
613 | /* use O_RDWR|O_CREAT so that file is created if it doesn't exist. */ | 613 | /* use O_RDWR|O_CREAT so that file is created if it doesn't exist. */ |
614 | fp = rb->open(MEMO_FILE, O_RDWR|O_CREAT); | 614 | fp = rb->open(MEMO_FILE, O_RDWR|O_CREAT); |
615 | fq = rb->creat(TEMP_FILE); | 615 | fq = rb->creat(TEMP_FILE, 0666); |
616 | if ( (fq > -1) && (fp > -1) ) | 616 | if ( (fq > -1) && (fp > -1) ) |
617 | { | 617 | { |
618 | int i; | 618 | int i; |
diff --git a/apps/plugins/clock/clock_settings.c b/apps/plugins/clock/clock_settings.c index 8464ab0ed1..a407ebe65f 100644 --- a/apps/plugins/clock/clock_settings.c +++ b/apps/plugins/clock/clock_settings.c | |||
@@ -119,7 +119,7 @@ enum settings_file_status clock_settings_load(struct clock_settings* settings, | |||
119 | 119 | ||
120 | enum settings_file_status clock_settings_save(struct clock_settings* settings, | 120 | enum settings_file_status clock_settings_save(struct clock_settings* settings, |
121 | char* filename){ | 121 | char* filename){ |
122 | int fd = rb->creat(filename); | 122 | int fd = rb->creat(filename, 0666); |
123 | if(fd >= 0){ /* does file exist? */ | 123 | if(fd >= 0){ /* does file exist? */ |
124 | rb->write (fd, settings, sizeof(*settings)); | 124 | rb->write (fd, settings, sizeof(*settings)); |
125 | rb->close(fd); | 125 | rb->close(fd); |
diff --git a/apps/plugins/disktidy.c b/apps/plugins/disktidy.c index 3d2685f4ad..8d8515e27b 100644 --- a/apps/plugins/disktidy.c +++ b/apps/plugins/disktidy.c | |||
@@ -536,7 +536,7 @@ enum plugin_status plugin_start(const void* parameter) | |||
536 | status = tidy_lcd_menu(); | 536 | status = tidy_lcd_menu(); |
537 | if (tidy_loaded_and_changed) | 537 | if (tidy_loaded_and_changed) |
538 | { | 538 | { |
539 | int fd = rb->creat(CUSTOM_FILES); | 539 | int fd = rb->creat(CUSTOM_FILES, 0666); |
540 | int i; | 540 | int i; |
541 | if (fd >= 0) | 541 | if (fd >= 0) |
542 | { | 542 | { |
diff --git a/apps/plugins/goban/util.c b/apps/plugins/goban/util.c index 0e83173f40..bb78316346 100644 --- a/apps/plugins/goban/util.c +++ b/apps/plugins/goban/util.c | |||
@@ -221,7 +221,7 @@ create_or_open_file (const char *filename) | |||
221 | 221 | ||
222 | if (!rb->file_exists (filename)) | 222 | if (!rb->file_exists (filename)) |
223 | { | 223 | { |
224 | fd = rb->creat (filename); | 224 | fd = rb->creat(filename, 0666); |
225 | } | 225 | } |
226 | else | 226 | else |
227 | { | 227 | { |
diff --git a/apps/plugins/iriverify.c b/apps/plugins/iriverify.c index 546601baad..4e8ca5b420 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); | 70 | fd = rb->creat(tmpfilename, 0666); |
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/configfile.c b/apps/plugins/lib/configfile.c index 21b66a317b..0fb01c6a40 100644 --- a/apps/plugins/lib/configfile.c +++ b/apps/plugins/lib/configfile.c | |||
@@ -46,7 +46,7 @@ int configfile_save(const char *filename, struct configdata *cfg, | |||
46 | char buf[MAX_PATH]; | 46 | char buf[MAX_PATH]; |
47 | 47 | ||
48 | get_cfg_filename(buf, MAX_PATH, filename); | 48 | get_cfg_filename(buf, MAX_PATH, filename); |
49 | fd = rb->creat(buf); | 49 | fd = rb->creat(buf, 0666); |
50 | if(fd < 0) | 50 | if(fd < 0) |
51 | return fd*10 - 1; | 51 | return fd*10 - 1; |
52 | 52 | ||
diff --git a/apps/plugins/lib/pluginlib_bmp.c b/apps/plugins/lib/pluginlib_bmp.c index 8520a8b17f..148aa8e1de 100644 --- a/apps/plugins/lib/pluginlib_bmp.c +++ b/apps/plugins/lib/pluginlib_bmp.c | |||
@@ -60,7 +60,7 @@ int save_bmp_file( char* filename, struct bitmap *bm ) | |||
60 | int fh; | 60 | int fh; |
61 | int x,y; | 61 | int x,y; |
62 | if( bm->format != FORMAT_NATIVE ) return -1; | 62 | if( bm->format != FORMAT_NATIVE ) return -1; |
63 | fh = rb->creat( filename ); | 63 | fh = rb->creat( filename , 0666); |
64 | if( fh < 0 ) return -1; | 64 | if( fh < 0 ) return -1; |
65 | 65 | ||
66 | rb->write( fh, header, sizeof( header ) ); | 66 | rb->write( fh, header, sizeof( header ) ); |
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c index b12c8e8e04..463f86c394 100644 --- a/apps/plugins/pictureflow/pictureflow.c +++ b/apps/plugins/pictureflow/pictureflow.c | |||
@@ -1161,7 +1161,7 @@ bool save_pfraw(char* filename, struct bitmap *bm) | |||
1161 | struct pfraw_header bmph; | 1161 | struct pfraw_header bmph; |
1162 | bmph.width = bm->width; | 1162 | bmph.width = bm->width; |
1163 | bmph.height = bm->height; | 1163 | bmph.height = bm->height; |
1164 | int fh = rb->creat( filename ); | 1164 | int fh = rb->creat( filename , 0666); |
1165 | if( fh < 0 ) return false; | 1165 | if( fh < 0 ) return false; |
1166 | rb->write( fh, &bmph, sizeof( struct pfraw_header ) ); | 1166 | rb->write( fh, &bmph, sizeof( struct pfraw_header ) ); |
1167 | int y; | 1167 | int y; |
diff --git a/apps/plugins/pitch_detector.c b/apps/plugins/pitch_detector.c index 10125c1302..de0aff9fef 100644 --- a/apps/plugins/pitch_detector.c +++ b/apps/plugins/pitch_detector.c | |||
@@ -381,7 +381,7 @@ enum settings_file_status tuner_settings_load(struct tuner_settings* settings, | |||
381 | enum settings_file_status tuner_settings_save(struct tuner_settings* settings, | 381 | enum settings_file_status tuner_settings_save(struct tuner_settings* settings, |
382 | char* filename) | 382 | char* filename) |
383 | { | 383 | { |
384 | int fd = rb->creat(filename); | 384 | int fd = rb->creat(filename, 0666); |
385 | if(fd >= 0){ /* does file exist? */ | 385 | if(fd >= 0){ /* does file exist? */ |
386 | rb->write (fd, settings, sizeof(*settings)); | 386 | rb->write (fd, settings, sizeof(*settings)); |
387 | rb->close(fd); | 387 | rb->close(fd); |
diff --git a/apps/plugins/random_folder_advance_config.c b/apps/plugins/random_folder_advance_config.c index 5f837980d3..6a62fee8ff 100644 --- a/apps/plugins/random_folder_advance_config.c +++ b/apps/plugins/random_folder_advance_config.c | |||
@@ -263,7 +263,7 @@ int load_list(void) | |||
263 | 263 | ||
264 | int save_list(void) | 264 | int save_list(void) |
265 | { | 265 | { |
266 | int myfd = rb->creat(RFA_FILE); | 266 | int myfd = rb->creat(RFA_FILE, 0666); |
267 | if (myfd < 0) | 267 | if (myfd < 0) |
268 | { | 268 | { |
269 | rb->splash(HZ, "Could Not Open " RFA_FILE); | 269 | rb->splash(HZ, "Could Not Open " RFA_FILE); |
@@ -388,7 +388,7 @@ int export_list_to_file_text(void) | |||
388 | } | 388 | } |
389 | 389 | ||
390 | /* create and open the file */ | 390 | /* create and open the file */ |
391 | int myfd = rb->creat(RFA_FILE_TEXT); | 391 | int myfd = rb->creat(RFA_FILE_TEXT, 0666); |
392 | if (myfd < 0) | 392 | if (myfd < 0) |
393 | { | 393 | { |
394 | rb->splashf(HZ*4, "failed to open: fd = %d, file = %s", | 394 | rb->splashf(HZ*4, "failed to open: fd = %d, file = %s", |
diff --git a/apps/plugins/shortcuts/shortcuts_common.c b/apps/plugins/shortcuts/shortcuts_common.c index 68817d3081..dee1657afc 100644 --- a/apps/plugins/shortcuts/shortcuts_common.c +++ b/apps/plugins/shortcuts/shortcuts_common.c | |||
@@ -85,7 +85,7 @@ bool load_sc_file(sc_file_t *file, char *filename, bool must_exist, | |||
85 | /* The file didn't exist on disk */ | 85 | /* The file didn't exist on disk */ |
86 | if (!must_exist) { | 86 | if (!must_exist) { |
87 | DEBUGF("Trying to create link file '%s'...\n", filename); | 87 | DEBUGF("Trying to create link file '%s'...\n", filename); |
88 | fd = rb->creat(filename); | 88 | fd = rb->creat(filename, 0666); |
89 | if (fd < 0){ | 89 | if (fd < 0){ |
90 | /* For some reason we couldn't create the file, | 90 | /* For some reason we couldn't create the file, |
91 | * so return an error message and exit */ | 91 | * so return an error message and exit */ |
diff --git a/apps/plugins/test_codec.c b/apps/plugins/test_codec.c index 03c2daa30b..f3b826e04e 100644 --- a/apps/plugins/test_codec.c +++ b/apps/plugins/test_codec.c | |||
@@ -167,7 +167,7 @@ void init_wav(char* filename) | |||
167 | { | 167 | { |
168 | wavinfo.totalsamples = 0; | 168 | wavinfo.totalsamples = 0; |
169 | 169 | ||
170 | wavinfo.fd = rb->creat(filename); | 170 | wavinfo.fd = rb->creat(filename, 0666); |
171 | 171 | ||
172 | if (wavinfo.fd >= 0) | 172 | if (wavinfo.fd >= 0) |
173 | { | 173 | { |
diff --git a/apps/plugins/test_disk.c b/apps/plugins/test_disk.c index 9d186e04f9..396e03c818 100644 --- a/apps/plugins/test_disk.c +++ b/apps/plugins/test_disk.c | |||
@@ -123,7 +123,7 @@ static bool test_fs(void) | |||
123 | rb->snprintf(text_buf, sizeof text_buf, "Data size: %dKB", (TEST_SIZE>>10)); | 123 | rb->snprintf(text_buf, sizeof text_buf, "Data size: %dKB", (TEST_SIZE>>10)); |
124 | log_text(text_buf, true); | 124 | log_text(text_buf, true); |
125 | 125 | ||
126 | fd = rb->creat(TEST_FILE); | 126 | fd = rb->creat(TEST_FILE, 0666); |
127 | if (fd < 0) | 127 | if (fd < 0) |
128 | { | 128 | { |
129 | rb->splash(HZ, "creat() failed."); | 129 | rb->splash(HZ, "creat() failed."); |
@@ -211,7 +211,7 @@ static bool file_speed(int chunksize, bool align) | |||
211 | log_text("--------------------", true); | 211 | log_text("--------------------", true); |
212 | 212 | ||
213 | /* File creation write speed */ | 213 | /* File creation write speed */ |
214 | fd = rb->creat(TEST_FILE); | 214 | fd = rb->creat(TEST_FILE, 0666); |
215 | if (fd < 0) | 215 | if (fd < 0) |
216 | { | 216 | { |
217 | rb->splash(HZ, "creat() failed."); | 217 | rb->splash(HZ, "creat() failed."); |
@@ -311,7 +311,7 @@ static bool test_speed(void) | |||
311 | for (i = 0; TIME_BEFORE(*rb->current_tick, time); i++) | 311 | for (i = 0; TIME_BEFORE(*rb->current_tick, time); i++) |
312 | { | 312 | { |
313 | rb->snprintf(text_buf, sizeof(text_buf), TESTBASEDIR "/%08x.tmp", i); | 313 | rb->snprintf(text_buf, sizeof(text_buf), TESTBASEDIR "/%08x.tmp", i); |
314 | fd = rb->creat(text_buf); | 314 | fd = rb->creat(text_buf, 0666); |
315 | if (fd < 0) | 315 | if (fd < 0) |
316 | { | 316 | { |
317 | last_file = i; | 317 | last_file = i; |
diff --git a/apps/plugins/vbrfix.c b/apps/plugins/vbrfix.c index 3e152be3fc..2ca0176084 100644 --- a/apps/plugins/vbrfix.c +++ b/apps/plugins/vbrfix.c | |||
@@ -49,7 +49,7 @@ static int insert_data_in_file(const char *fname, int fpos, char *buf, int num_b | |||
49 | return 10*orig_fd - 1; | 49 | return 10*orig_fd - 1; |
50 | } | 50 | } |
51 | 51 | ||
52 | fd = rb->creat(tmpname); | 52 | fd = rb->creat(tmpname, 0666); |
53 | if(fd < 0) { | 53 | if(fd < 0) { |
54 | rb->close(orig_fd); | 54 | rb->close(orig_fd); |
55 | return 10*fd - 2; | 55 | return 10*fd - 2; |
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c index 7cf5a5f00c..fc04bc7842 100644 --- a/apps/plugins/vu_meter.c +++ b/apps/plugins/vu_meter.c | |||
@@ -457,7 +457,7 @@ void load_settings(void) { | |||
457 | } | 457 | } |
458 | 458 | ||
459 | void save_settings(void) { | 459 | void save_settings(void) { |
460 | int fp = rb->creat(PLUGIN_DEMOS_DIR "/.vu_meter"); | 460 | int fp = rb->creat(PLUGIN_DEMOS_DIR "/.vu_meter", 0666); |
461 | if(fp >= 0) { | 461 | if(fp >= 0) { |
462 | rb->write (fp, &vumeter_settings, sizeof(struct saved_settings)); | 462 | rb->write (fp, &vumeter_settings, sizeof(struct saved_settings)); |
463 | rb->close(fp); | 463 | rb->close(fp); |
diff --git a/apps/plugins/wav2wv.c b/apps/plugins/wav2wv.c index 1102d13718..03900884f9 100644 --- a/apps/plugins/wav2wv.c +++ b/apps/plugins/wav2wv.c | |||
@@ -169,7 +169,7 @@ static int wav2wv(const char *infile) | |||
169 | outextension = outfile + rb->strlen(outfile) - 3; | 169 | outextension = outfile + rb->strlen(outfile) - 3; |
170 | outextension[1] = outextension[2]; | 170 | outextension[1] = outextension[2]; |
171 | outextension[2] = 0; | 171 | outextension[2] = 0; |
172 | out_fd = rb->creat(outfile); | 172 | out_fd = rb->creat(outfile, 0666); |
173 | 173 | ||
174 | if (out_fd < 0) { | 174 | if (out_fd < 0) { |
175 | rb->splash(HZ*2, "could not create file!"); | 175 | rb->splash(HZ*2, "could not create file!"); |
diff --git a/apps/plugins/zxbox/snapshot.c b/apps/plugins/zxbox/snapshot.c index 6efb29f91b..0b80b64497 100644 --- a/apps/plugins/zxbox/snapshot.c +++ b/apps/plugins/zxbox/snapshot.c | |||
@@ -584,7 +584,7 @@ static void save_snapshot_file_type(char *name, int type) | |||
584 | int snsh; | 584 | int snsh; |
585 | snsh = rb->open(name, O_WRONLY); | 585 | snsh = rb->open(name, O_WRONLY); |
586 | if(snsh < 0) { | 586 | if(snsh < 0) { |
587 | snsh = rb->creat(name); | 587 | snsh = rb->creat(name, 0666); |
588 | if(snsh < 0) { | 588 | if(snsh < 0) { |
589 | put_msg("Could not create snapshot file"); | 589 | put_msg("Could not create snapshot file"); |
590 | return; | 590 | return; |