* rt/aio_fsync.c: Test OP parameter for correct values.
* 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):
#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);