Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2007-05-08 02:22:05 +0400
committerJeff Johnston <jjohnstn@redhat.com>2007-05-08 02:22:05 +0400
commit8f954ad3f84969f71133a70e78bb5a290950dbdc (patch)
treef909d95add6c2b4f6c123da6032058fafa05ed9d /libgloss/spu
parentb9db5292223d1e716a126b5db8a69391ba4ef73e (diff)
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.
Diffstat (limited to 'libgloss/spu')
-rw-r--r--libgloss/spu/open.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/libgloss/spu/open.c b/libgloss/spu/open.c
index c005f1d0a..c6882bd86 100644
--- a/libgloss/spu/open.c
+++ b/libgloss/spu/open.c
@@ -39,6 +39,7 @@ open (const char *filename, int flags, ...)
{
syscall_open_t sys ;
syscall_out_t *psys_out = ( syscall_out_t* )&sys;
+ va_list ap;
sys.pathname = ( unsigned int )filename;
@@ -63,22 +64,11 @@ open (const char *filename, int flags, ...)
sys.flags |= ( ( flags & O_WRONLY ) ? JSRE_O_WRONLY : 0 );
sys.flags |= ( ( flags & O_RDWR ) ? JSRE_O_RDWR : 0 );
-
/* FIXME: we have to check/map all flags */
- if ((sys.flags & O_CREAT))
- {
- va_list ap;
-
- va_start (ap, flags);
- sys.mode = va_arg (ap, int);
- va_end (ap);
-
- }
- else
- {
- sys.mode = 0;
- }
+ va_start (ap, flags);
+ sys.mode = va_arg (ap, int);
+ va_end (ap);
__send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_OPEN, &sys);