]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 5 Aug 1999 00:21:21 +0000 (00:21 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 5 Aug 1999 00:21:21 +0000 (00:21 +0000)
* rt/aio_fsync.c: Test OP parameter for correct values.

ChangeLog
rt/aio_fsync.c

index ba82759f183e14d882c875fa9ebb0830e668d00d..8b1c59004a8b31b8443f799b2c9c556e5de09db6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,8 @@
 
        * rt/aio_misc.c: Set errno at correct place.
 
+       * rt/aio_fsync.c: Test OP parameter for correct values.
+
 1999-08-04  Andreas Schwab  <schwab@suse.de>
 
        * sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_PARSER):
index 72d4837b38562ba27c0c93df8c354ce066ee3656..298b4ec87d335a9d9908602db41f3f50b18974c5 100644 (file)
@@ -28,6 +28,7 @@
 #include <aio.h>
 /* And undo the hack.  */
 #undef aio_fsync64
+#include <errno.h>
 
 #include "aio_misc.h"
 
 int
 aio_fsync (int op, struct aiocb *aiocbp)
 {
+  if (op != O_DSYNC && op != O_SYNC)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
   return (__aio_enqueue_request ((aiocb_union *) aiocbp,
                                 op == O_SYNC ? LIO_SYNC : LIO_DSYNC) == NULL
          ? -1 : 0);