2007-05-07 Patrick Mansfield <patmans@us.ibm.com>
* spu/open.c: Unconditionally set the "mode" to fix a bug where mode was not properly set.
This commit is contained in:
parent
b9db529222
commit
8f954ad3f8
|
@ -1,3 +1,8 @@
|
||||||
|
2007-05-07 Patrick Mansfield <patmans@us.ibm.com>
|
||||||
|
|
||||||
|
* spu/open.c: Unconditionally set the "mode" to fix a bug where
|
||||||
|
mode was not properly set.
|
||||||
|
|
||||||
2007-05-03 Kazu Hirata <kazu@codesourcery.com>
|
2007-05-03 Kazu Hirata <kazu@codesourcery.com>
|
||||||
|
|
||||||
* m68k/fido-_exit.c (_exit): Use stop #0x700.
|
* m68k/fido-_exit.c (_exit): Use stop #0x700.
|
||||||
|
|
|
@ -39,6 +39,7 @@ open (const char *filename, int flags, ...)
|
||||||
{
|
{
|
||||||
syscall_open_t sys ;
|
syscall_open_t sys ;
|
||||||
syscall_out_t *psys_out = ( syscall_out_t* )&sys;
|
syscall_out_t *psys_out = ( syscall_out_t* )&sys;
|
||||||
|
va_list ap;
|
||||||
|
|
||||||
sys.pathname = ( unsigned int )filename;
|
sys.pathname = ( unsigned int )filename;
|
||||||
|
|
||||||
|
@ -63,23 +64,12 @@ open (const char *filename, int flags, ...)
|
||||||
sys.flags |= ( ( flags & O_WRONLY ) ? JSRE_O_WRONLY : 0 );
|
sys.flags |= ( ( flags & O_WRONLY ) ? JSRE_O_WRONLY : 0 );
|
||||||
sys.flags |= ( ( flags & O_RDWR ) ? JSRE_O_RDWR : 0 );
|
sys.flags |= ( ( flags & O_RDWR ) ? JSRE_O_RDWR : 0 );
|
||||||
|
|
||||||
|
|
||||||
/* FIXME: we have to check/map all flags */
|
/* FIXME: we have to check/map all flags */
|
||||||
|
|
||||||
if ((sys.flags & O_CREAT))
|
|
||||||
{
|
|
||||||
va_list ap;
|
|
||||||
|
|
||||||
va_start (ap, flags);
|
va_start (ap, flags);
|
||||||
sys.mode = va_arg (ap, int);
|
sys.mode = va_arg (ap, int);
|
||||||
va_end (ap);
|
va_end (ap);
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sys.mode = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
__send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_OPEN, &sys);
|
__send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_OPEN, &sys);
|
||||||
|
|
||||||
return ( psys_out->rc);
|
return ( psys_out->rc);
|
||||||
|
|
Loading…
Reference in New Issue