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:
parent
3772a08729
commit
930a8a5050
8 changed files with 8 additions and 12 deletions
|
@ -727,11 +727,7 @@ static int create_soundfile(t_canvas *canvas, const char *filename,
|
|||
|
||||
canvas_makefilename(canvas, filenamebuf, buf2, MAXPDSTRING);
|
||||
sys_bashfilename(buf2, buf2);
|
||||
#ifdef ROCKBOX
|
||||
if ((fd = open(buf2, BINCREATE)) < 0)
|
||||
#else
|
||||
if ((fd = open(buf2, BINCREATE, 0666)) < 0)
|
||||
#endif
|
||||
return (-1);
|
||||
|
||||
if (write(fd, headerbuf, headersize) < headersize)
|
||||
|
|
|
@ -641,7 +641,7 @@ static int binbuf_doopen(char *s, int mode)
|
|||
mode |= O_BINARY;
|
||||
#endif
|
||||
sys_bashfilename(s, namebuf);
|
||||
return (open(namebuf, mode));
|
||||
return (open(namebuf, mode, 0666));
|
||||
}
|
||||
|
||||
#ifndef ROCKBOX
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue