summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2022-02-23 16:07:58 -0700
committerJens Axboe <axboe@kernel.dk>2022-02-23 16:07:58 -0700
commit0044891891fff576fcf60143a3c70b30642d0f60 (patch)
tree33109a4e4bb8b56440680140c31d978b55eaa821
parent071ad6354d1e0a6da48469fbbd750cc4ca400a2c (diff)
downloadliburing-0044891891fff576fcf60143a3c70b30642d0f60.tar.gz
liburing-0044891891fff576fcf60143a3c70b30642d0f60.tar.bz2
man: ensure that -1 is always bold
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--man/io_uring_enter.213
-rw-r--r--man/io_uring_register.219
-rw-r--r--man/io_uring_setup.212
3 files changed, 31 insertions, 13 deletions
diff --git a/man/io_uring_enter.2 b/man/io_uring_enter.2
index 74df569..192b76b 100644
--- a/man/io_uring_enter.2
+++ b/man/io_uring_enter.2
@@ -780,7 +780,9 @@ does not refer to a seekable file,
.I off
must be set to zero. If
.I offs
-is set to -1, the offset will use (and advance) the file position, like the
+is set to
+.B -1
+, the offset will use (and advance) the file position, like the
.BR read(2)
and
.BR write(2)
@@ -806,8 +808,9 @@ is an offset to read from,
.I fd
is the file descriptor to write to,
.I off
-is an offset from which to start writing to. A sentinel value of -1 is used
-to pass the equivalent of a NULL for the offsets to
+is an offset from which to start writing to. A sentinel value of
+.B -1
+is used to pass the equivalent of a NULL for the offsets to
.BR splice(2).
.I len
contains the number of bytes to copy.
@@ -1266,7 +1269,9 @@ completion queue entry (see section
rather than through the system call itself.
Errors that occur not on behalf of a submission queue entry are returned via the
-system call directly. On such an error, -1 is returned and
+system call directly. On such an error,
+.B -1
+is returned and
.I errno
is set appropriately.
.PP
diff --git a/man/io_uring_register.2 b/man/io_uring_register.2
index 887567f..2072cb2 100644
--- a/man/io_uring_register.2
+++ b/man/io_uring_register.2
@@ -265,9 +265,11 @@ Available since 5.13.
.TP
.B IORING_REGISTER_FILES_UPDATE
This operation replaces existing files in the registered file set with new
-ones, either turning a sparse entry (one where fd is equal to -1) into a
-real one, removing an existing entry (new one is set to -1), or replacing
-an existing entry with a new existing entry.
+ones, either turning a sparse entry (one where fd is equal to
+.B -1
+) into a real one, removing an existing entry (new one is set to
+.B -1
+), or replacing an existing entry with a new existing entry.
.I arg
must contain a pointer to a
@@ -288,8 +290,11 @@ fd at that index. Available since 5.12.
.B IORING_REGISTER_FILES_UPDATE2
Similar to IORING_REGISTER_FILES_UPDATE, replaces existing files in the
registered file set with new ones, either turning a sparse entry (one where
-fd is equal to -1) into a real one, removing an existing entry (new one is
-set to -1), or replacing an existing entry with a new existing entry.
+fd is equal to
+.B -1
+) into a real one, removing an existing entry (new one is set to
+.B -1
+), or replacing an existing entry with a new existing entry.
.I arg
must contain a pointer to a
@@ -496,7 +501,9 @@ Available since 5.15.
On success,
.BR io_uring_register ()
-returns 0. On error, -1 is returned, and
+returns 0. On error,
+.B -1
+is returned, and
.I errno
is set accordingly.
diff --git a/man/io_uring_setup.2 b/man/io_uring_setup.2
index d527a6a..897db6e 100644
--- a/man/io_uring_setup.2
+++ b/man/io_uring_setup.2
@@ -224,7 +224,9 @@ since kernel 5.5.
.B IORING_FEAT_RW_CUR_POS
If this flag is set, applications can specify
.I offset
-== -1 with
+==
+.B -1
+with
.B IORING_OP_{READV,WRITEV}
,
.B IORING_OP_{READ,WRITE}_FIXED
@@ -236,7 +238,9 @@ and
.I pwritev2(2)
with
.I offset
-== -1. It'll use (and update) the current file position. This obviously comes
+==
+.B -1.
+It'll use (and update) the current file position. This obviously comes
with the caveat that if the application has multiple reads or writes in flight,
then the end result will not be as expected. This is similar to threads sharing
a file descriptor and doing IO using the current file position. Available since
@@ -470,7 +474,9 @@ or
.BR io_uring_enter (2)
system calls.
-On error, -1 is returned and
+On error,
+.B -1
+is returned and
.I errno
is set appropriately.
.PP