summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDan Everton <dan@iocaine.org>2006-05-30 11:26:41 +0000
committerDan Everton <dan@iocaine.org>2006-05-30 11:26:41 +0000
commitb2ec716534441d9dea42051ce8bf2c1df227685a (patch)
tree34e4dfc8a4c2c595209437ccfb62fc1405860845 /apps
parente41c85806ecc5b8ed1383f856595d61ad45d6657 (diff)
downloadrockbox-b2ec716534441d9dea42051ce8bf2c1df227685a.tar.gz
rockbox-b2ec716534441d9dea42051ce8bf2c1df227685a.tar.bz2
rockbox-b2ec716534441d9dea42051ce8bf2c1df227685a.zip
Use correct file mode when creating files. Fixes task 5452
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10020 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/eq_menu.c2
-rw-r--r--apps/plugins/battery_test.c2
-rw-r--r--apps/plugins/calendar.c4
-rw-r--r--apps/plugins/iriverify.c2
-rw-r--r--apps/plugins/lib/configfile.c2
-rw-r--r--apps/plugins/search.c2
-rw-r--r--apps/plugins/sort.c2
-rw-r--r--apps/settings.c2
-rw-r--r--apps/tree.c2
9 files changed, 10 insertions, 10 deletions
diff --git a/apps/eq_menu.c b/apps/eq_menu.c
index 5dc554316c..63c6fa20f8 100644
--- a/apps/eq_menu.c
+++ b/apps/eq_menu.c
@@ -719,7 +719,7 @@ static bool eq_save_preset(void)
/* allow user to modify filename */
while (true) {
if (!kbd_input(filename, sizeof filename)) {
- fd = creat(filename,0);
+ fd = creat(filename, O_WRONLY);
if (fd < 0)
gui_syncsplash(HZ, true, str(LANG_FAILED));
else
diff --git a/apps/plugins/battery_test.c b/apps/plugins/battery_test.c
index e94070f137..0d38b3281c 100644
--- a/apps/plugins/battery_test.c
+++ b/apps/plugins/battery_test.c
@@ -68,7 +68,7 @@ int init(void)
#endif
/* create a big dummy file */
- f = rb->creat("/battery.dummy", 0);
+ f = rb->creat("/battery.dummy", O_WRONLY);
if (f<0) {
rb->splash(HZ, true, "Can't create /battery.dummy");
return -1;
diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c
index 464d810342..a57cadedd2 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)
{
int fp,fq;
fp = rb->open("/.rockbox/.memo",O_RDONLY | O_CREAT);
- fq = rb->creat("/.rockbox/~temp", 0);
+ fq = rb->creat("/.rockbox/~temp", O_WRONLY);
if ( (fq != -1) && (fp != -1) )
{
int i;
@@ -345,7 +345,7 @@ static bool save_memo(int changed, bool new_mod, struct shown *shown)
rb->write(fq,temp,1);
}
rb->close(fp);
- fp = rb->creat("/.rockbox/.memo", 0);
+ fp = rb->creat("/.rockbox/.memo", O_WRONLY);
rb->lseek(fp, 0, SEEK_SET);
rb->lseek(fq, 0, SEEK_SET);
for (i = 0; i < rb->filesize(fq); i++)
diff --git a/apps/plugins/iriverify.c b/apps/plugins/iriverify.c
index a0f8d50a5f..47cb385f0f 100644
--- a/apps/plugins/iriverify.c
+++ b/apps/plugins/iriverify.c
@@ -67,7 +67,7 @@ static int write_file(void)
rb->snprintf(tmpfilename, MAX_PATH+1, "%s.tmp", filename);
- fd = rb->creat(tmpfilename, 0);
+ fd = rb->creat(tmpfilename, O_WRONLY);
if(fd < 0)
return 10 * fd - 1;
diff --git a/apps/plugins/lib/configfile.c b/apps/plugins/lib/configfile.c
index f2f0a39da0..d5b60bcfbc 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,
char buf[MAX_PATH];
cfg_rb->snprintf(buf, MAX_PATH, "/.rockbox/rocks/%s", filename);
- fd = cfg_rb->creat(buf, 0);
+ fd = cfg_rb->creat(buf, O_WRONLY);
if(fd < 0)
return fd*10 - 1;
diff --git a/apps/plugins/search.c b/apps/plugins/search.c
index fb9d239dc7..b8cc5bff5e 100644
--- a/apps/plugins/search.c
+++ b/apps/plugins/search.c
@@ -126,7 +126,7 @@ static bool search_init(char* file)
if (fd==-1)
return false;
- fdw = rb->creat(resultfile,0);
+ fdw = rb->creat(resultfile, O_WRONLY);
if (fdw < 0) {
#ifdef HAVE_LCD_BITMAP
diff --git a/apps/plugins/sort.c b/apps/plugins/sort.c
index 7ba510ec32..77342f33e9 100644
--- a/apps/plugins/sort.c
+++ b/apps/plugins/sort.c
@@ -140,7 +140,7 @@ static int write_file(void)
/* Create a temporary file */
rb->snprintf(tmpfilename, MAX_PATH+1, "%s.tmp", filename);
- fd = rb->creat(tmpfilename, 0);
+ fd = rb->creat(tmpfilename, O_WRONLY);
if(fd < 0)
return 10 * fd - 1;
diff --git a/apps/settings.c b/apps/settings.c
index 8122c58aa8..0d6ee1d376 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -1588,7 +1588,7 @@ bool settings_save_config(void)
/* allow user to modify filename */
while (true) {
if (!kbd_input(filename, sizeof filename)) {
- fd = creat(filename,0);
+ fd = creat(filename, O_WRONLY);
if (fd < 0)
gui_syncsplash(HZ, true, str(LANG_FAILED));
else
diff --git a/apps/tree.c b/apps/tree.c
index 05961db66c..35cefb163d 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -1148,7 +1148,7 @@ bool create_playlist(void)
gui_textarea_update(&screens[i]);
#endif
}
- fd = creat(filename,0);
+ fd = creat(filename, O_WRONLY);
if (fd < 0)
return false;