1
0
Fork 0
forked from len0rd/rockbox

set mode argument for open() where O_CREAT flag is/can be set.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28527 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Teruaki Kawashima 2010-11-07 11:45:20 +00:00
parent 3772a08729
commit 930a8a5050
8 changed files with 8 additions and 12 deletions

View file

@ -96,7 +96,7 @@ boolean M_WriteFile(char const* name,void* source,int length)
int handle;
int count;
handle = open ( name, O_WRONLY | O_CREAT | O_TRUNC);
handle = open ( name, O_WRONLY | O_CREAT | O_TRUNC, 0666);
if (handle == -1)
return false;
@ -805,7 +805,7 @@ void M_SaveDefaults (void)
uint32_t magic = DOOM_CONFIG_MAGIC;
uint32_t ver = DOOM_CONFIG_VERSION;
fd = open (GAMEBASE"default.dfg", O_WRONLY|O_CREAT|O_TRUNC);
fd = open (GAMEBASE"default.dfg", O_WRONLY|O_CREAT|O_TRUNC, 0666);
if (fd<0)
return; // can't write the file, but don't complain