diff --git a/manual/llio.texi b/manual/llio.texi index e55b02d8bd..85aa32b4f0 100644 --- a/manual/llio.texi +++ b/manual/llio.texi @@ -1339,6 +1339,10 @@ will fail and set @code{errno} to @code{EAGAIN} if the operation would block. @item RWF_APPEND Per-IO synchronization as if the file was opened with @code{O_APPEND} flag. + +@item RWF_NOAPPEND +This flag allows an offset to be honored, even if the file was opened with +@code{O_APPEND} flag. @end vtable When the source file is compiled with @code{_FILE_OFFSET_BITS == 64} the diff --git a/misc/tst-preadvwritev2-common.c b/misc/tst-preadvwritev2-common.c index 40b527bdcb..ed3dc04eeb 100644 --- a/misc/tst-preadvwritev2-common.c +++ b/misc/tst-preadvwritev2-common.c @@ -34,8 +34,11 @@ #ifndef RWF_APPEND # define RWF_APPEND 0 #endif +#ifndef RWF_NOAPPEND +# define RWF_NOAPPEND 0 +#endif #define RWF_SUPPORTED (RWF_HIPRI | RWF_DSYNC | RWF_SYNC | RWF_NOWAIT \ - | RWF_APPEND) + | RWF_APPEND | RWF_NOAPPEND) /* Generic uio_lim.h does not define IOV_MAX. */ #ifndef IOV_MAX diff --git a/sysdeps/unix/sysv/linux/bits/uio-ext.h b/sysdeps/unix/sysv/linux/bits/uio-ext.h index 5b0dba08c5..e49b66facd 100644 --- a/sysdeps/unix/sysv/linux/bits/uio-ext.h +++ b/sysdeps/unix/sysv/linux/bits/uio-ext.h @@ -47,6 +47,7 @@ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec, #define RWF_SYNC 0x00000004 /* per-IO O_SYNC. */ #define RWF_NOWAIT 0x00000008 /* per-IO nonblocking mode. */ #define RWF_APPEND 0x00000010 /* per-IO O_APPEND. */ +#define RWF_NOAPPEND 0x00000020 /* per-IO negation of O_APPEND */ __END_DECLS