This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.16-ports-merge-386-gb31606c


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  b31606c0e1d9f04e2498b7c8262f7de87daa7ce7 (commit)
      from  115411772b189e9e41a97618816edd66f0a9a620 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b31606c0e1d9f04e2498b7c8262f7de87daa7ce7

commit b31606c0e1d9f04e2498b7c8262f7de87daa7ce7
Author: Pino Toscano <toscano.pino@tiscali.it>
Date:   Fri Sep 28 18:35:43 2012 +0200

    aio_fsync: fix the access mode check
    
    Make use of O_ACCMODE and O_RDONLY instead of assuming details of the O_* flags.

diff --git a/ChangeLog b/ChangeLog
index 27cf3a9..207519b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-09-28  Pino Toscano  <toscano.pino@tiscali.it>
+
+	* sysdeps/pthread/aio_fsync.c: Fix the file mode checking.
+
 2012-09-28  Dmitry V. Levin  <ldv@altlinux.org>
 
 	[BZ #11438]
diff --git a/sysdeps/pthread/aio_fsync.c b/sysdeps/pthread/aio_fsync.c
index 046e25c..5b5d186 100644
--- a/sysdeps/pthread/aio_fsync.c
+++ b/sysdeps/pthread/aio_fsync.c
@@ -46,7 +46,7 @@ aio_fsync (int op, struct aiocb *aiocbp)
 
   flags = fcntl (aiocbp->aio_fildes, F_GETFL);
   if (__builtin_expect (flags == -1, 0)
-      || __builtin_expect ((flags & (O_RDWR | O_WRONLY)) == 0, 0))
+      || __builtin_expect ((flags & O_ACCMODE) == O_RDONLY, 0))
     {
       __set_errno (EBADF);
       return -1;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                   |    4 ++++
 sysdeps/pthread/aio_fsync.c |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]