diff -Nru libaio-0.3.112/debian/changelog libaio-0.3.112/debian/changelog --- libaio-0.3.112/debian/changelog 2019-08-02 03:33:44.000000000 +0000 +++ libaio-0.3.112/debian/changelog 2019-08-16 03:11:10.000000000 +0000 @@ -1,3 +1,22 @@ +libaio (0.3.112-5) unstable; urgency=medium + + * Sync with upstream commits: + - Make test suite failures fatal, so we ignore errors for now, until it + passes at least in all release architectures. + - Add support for SKIPable tests. + - Allow running tests against the installed library, which will make + possible to add autopkgtests. + - Fix test case 5.t, by using a write() instead of a read() to force the + kernel to read from the unreadable buffer. + * Add a workaround to io_pgetevents() for 32-bit userland running on + 64-bit kernels to cope with the broken compat kernel syscall, which uses + a 64-bit pointer instead of a 32-bit one, and eats the sigset_t size + member which makes it then fail a consistency check and return -EINVAL. + This fixes test case 22.t. The kernel fix is being prepared as well. + * Add more detailed error messages to test case 22.t. + + -- Guillem Jover Fri, 16 Aug 2019 05:11:10 +0200 + libaio (0.3.112-4) unstable; urgency=medium * Switch to Standards-Version 4.4.0 (no changes needed). diff -Nru libaio-0.3.112/debian/patches/0001-Fix-io_pgetevents-syscall-wrapper-on-32-bit-userland.patch libaio-0.3.112/debian/patches/0001-Fix-io_pgetevents-syscall-wrapper-on-32-bit-userland.patch --- libaio-0.3.112/debian/patches/0001-Fix-io_pgetevents-syscall-wrapper-on-32-bit-userland.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0001-Fix-io_pgetevents-syscall-wrapper-on-32-bit-userland.patch 2019-08-16 02:54:28.000000000 +0000 @@ -0,0 +1,107 @@ +From 1013c9dccb3b60a66c2e8606762a246f995d8796 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Fri, 16 Aug 2019 02:33:46 +0200 +Subject: [PATCH libaio] Fix io_pgetevents() syscall wrapper on 32-bit userland + on 64-bit kernels + +The kernel compat syscall in the kernel got introduced with a broken +layout, which requires a pointer to the actual sigset_t variable but +with the size of the running kernel, not the size of the compat code. + +This means that when the wrapper sends the expected compat (32-bit) +pointer, the kernel reads a 64-bit pointer, eating with it also the +sigset size member. And then proceeds to fail the comparison of the +sigset_t size and returns EINVAL. + +This really needs to be fixed in the kernel, as there's no apparent +user of the broken compat layout (from codesearch.debian.org, nor a +quick github.com search). But we have to workaround it in libaio so +that we can use kernels that have not yet been fixed. + +We do that, by trying the non-broken layout (that would be used with +a 32-bit userland on a 32-bit kernel), and if that fails with -EINVAL +we retry with a structure padded to what the kernel expects. + +Signed-off-by: Guillem Jover +--- + src/io_pgetevents.c | 38 +++++++++++++++++++++++++++++++------- + src/libaio.h | 10 ++++++++++ + 2 files changed, 41 insertions(+), 7 deletions(-) + +diff --git a/src/io_pgetevents.c b/src/io_pgetevents.c +index e6b0614..b2515f2 100644 +--- a/src/io_pgetevents.c ++++ b/src/io_pgetevents.c +@@ -33,17 +33,41 @@ int io_pgetevents(io_context_t ctx, long min_nr, long nr, + struct io_event *events, struct timespec *timeout, + sigset_t *sigmask) + { +- struct { +- unsigned long ss; +- unsigned long ss_len; +- } data; ++ struct io_sigset aio_sigset; ++#ifndef __LP64__ ++ struct io_sigset_compat aio_sigset_compat = { 0 }; ++#endif ++ int ret; + + if (aio_ring_is_empty(ctx, timeout)) + return 0; + +- data.ss = (unsigned long)sigmask; +- data.ss_len = _NSIG / 8; +- return __io_pgetevents(ctx, min_nr, nr, events, timeout, &data); ++ aio_sigset.ss = (unsigned long)sigmask; ++ aio_sigset.ss_len = _NSIG / 8; ++ ret = __io_pgetevents(ctx, min_nr, nr, events, timeout, &aio_sigset); ++ ++#ifndef __LP64__ ++ /* ++ * The compat kernel syscall got introduced with an broken layout for ++ * its sigset argument, expecting it to contain a pointer for the ++ * non-compat pointer size. ++ * ++ * To cope with this on unfixed kernels, in case we are built as a ++ * 32-bit library (which could run on a kernel with compat code) and ++ * when the syscall returns EINVAL due to the kernel not finding the ++ * sigset size member when unpacking the structure, we retry with ++ * the fixed up compat layout, which requires the padding to be ++ * zero-filled, otherwise the 64-bit pointer will contain garbage. ++ */ ++ if (ret != -EINVAL) ++ return ret; ++ ++ aio_sigset_compat.ss = (unsigned long)sigmask; ++ aio_sigset_compat.ss_len = _NSIG / 8; ++ ret = __io_pgetevents(ctx, min_nr, nr, events, timeout, &aio_sigset_compat); ++#endif ++ ++ return ret; + } + #else + int io_pgetevents(io_context_t ctx, long min_nr, long nr, +diff --git a/src/libaio.h b/src/libaio.h +index 8b33382..30ccc34 100644 +--- a/src/libaio.h ++++ b/src/libaio.h +@@ -144,6 +144,16 @@ struct io_event { + PADDEDul(res2, __pad4); + }; + ++struct io_sigset { ++ unsigned long ss; ++ unsigned long ss_len; ++}; ++ ++struct io_sigset_compat { ++ PADDEDptr(unsigned long ss, __ss_pad); ++ unsigned long ss_len; ++}; ++ + #undef PADDED + #undef PADDEDptr + #undef PADDEDul +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0001-harness-allow-running-tests-against-the-installed-li.patch libaio-0.3.112/debian/patches/0001-harness-allow-running-tests-against-the-installed-li.patch --- libaio-0.3.112/debian/patches/0001-harness-allow-running-tests-against-the-installed-li.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0001-harness-allow-running-tests-against-the-installed-li.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,37 @@ +From 6507d3f7a2b1985a33d06f280b9388aa34054889 Mon Sep 17 00:00:00 2001 +From: Jeff Moyer +Date: Mon, 29 Jul 2019 10:07:23 -0400 +Subject: [PATCH libaio 01/26] harness: allow running tests against the + installed library + +A user can now specify "LIBAIO=/path/to/libaio.so" in order to run +the test harness against the installed library. + +Signed-off-by: Jeff Moyer +--- + harness/Makefile | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/harness/Makefile b/harness/Makefile +index f477737..87b33f6 100644 +--- a/harness/Makefile ++++ b/harness/Makefile +@@ -9,10 +9,14 @@ HARNESS_SRCS:=main.c + CFLAGS+=-Wall -Werror -I../src -g -O2 -DPAGE_SIZE=$(shell getconf PAGESIZE) + #-lpthread -lrt + ++# Change this on the build line to run tests against the installed libraries: ++# make LIBAIO=-laio partcheck ++LIBAIO?=../src/libaio.a ++ + all: $(PROGS) + + $(PROGS): %.p: %.t $(HARNESS_SRCS) +- $(CC) $(CFLAGS) -DTEST_NAME=\"$<\" -o $@ main.c ../src/libaio.a -lpthread ++ $(CC) $(CFLAGS) -DTEST_NAME=\"$<\" -o $@ main.c $(LIBAIO) -lpthread + + clean: + rm -f $(PROGS) *.o runtests.out rofile wofile rwfile +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0001-harness-Print-better-error-messages-on-error-conditi.patch libaio-0.3.112/debian/patches/0001-harness-Print-better-error-messages-on-error-conditi.patch --- libaio-0.3.112/debian/patches/0001-harness-Print-better-error-messages-on-error-conditi.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0001-harness-Print-better-error-messages-on-error-conditi.patch 2019-08-16 03:10:34.000000000 +0000 @@ -0,0 +1,74 @@ +From a0fcf4f45a88180ea5e5a2f71aa27f7ab4604bf3 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Fri, 16 Aug 2019 04:34:37 +0200 +Subject: [PATCH libaio] harness: Print better error messages on error + conditions + +These should help diagnose problems when dealing with error failures. + +Signed-off-by: Guillem Jover +--- + harness/cases/22.t | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/harness/cases/22.t b/harness/cases/22.t +index b13024e..8014dcf 100644 +--- a/harness/cases/22.t ++++ b/harness/cases/22.t +@@ -76,7 +76,7 @@ int test_main(void) + + ret = io_setup(1, &ctx); + if (ret) { +- printf("child: io_setup failed\n"); ++ printf("child: io_setup failed: %s\n", strerror(-ret)); + return 1; + } + +@@ -86,7 +86,7 @@ int test_main(void) + /* if poll isn't supported, skip the test */ + if (ret == -EINVAL) + return 3; +- printf("child: io_submit failed\n"); ++ printf("child: io_submit failed: %s\n", strerror(-ret)); + return 1; + } + +@@ -99,7 +99,7 @@ int test_main(void) + } while (ret == 0); + + if (ret != -EINTR) { +- printf("child: io_pgetevents did not set errno to EINTR\n"); ++ printf("child: io_pgetevents did not set errno to EINTR: %s\n", strerror(-ret)); + return 1; + } + +@@ -117,7 +117,7 @@ int test_main(void) + + ret = io_setup(1, &ctx); + if (ret) { +- printf("parent: io_setup failed\n"); ++ printf("parent: io_setup failed: %s\n", strerror(-ret)); + return 1; + } + +@@ -126,7 +126,7 @@ int test_main(void) + /* if poll isn't supported, skip the test */ + if (ret == -EINVAL) + return 3; +- printf("parent: io_submit failed with %d\n", ret); ++ printf("parent: io_submit failed with %d: %s\n", ret, strerror(-ret)); + return 1; + } + +@@ -134,7 +134,7 @@ int test_main(void) + + ret = io_pgetevents(ctx, 1, 1, &ev, NULL, &sigmask); + if (ret < 0) { +- printf("parent: io_pgetevents failed\n"); ++ printf("parent: io_pgetevents failed: %s\n", strerror(-ret)); + return 1; + } + if (ret != 1) { +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0001-harness-Use-destination-strncpy-expression-for-sizeo.patch libaio-0.3.112/debian/patches/0001-harness-Use-destination-strncpy-expression-for-sizeo.patch --- libaio-0.3.112/debian/patches/0001-harness-Use-destination-strncpy-expression-for-sizeo.patch 2019-02-26 02:34:09.000000000 +0000 +++ libaio-0.3.112/debian/patches/0001-harness-Use-destination-strncpy-expression-for-sizeo.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,52 +0,0 @@ -From ad2cdc64cd2953288f4cccadbf448e1bbf9ab338 Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Sat, 9 Feb 2019 00:25:38 +0100 -Subject: [PATCH 1/7] harness: Use destination strncpy() expression for - sizeof() argument -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Even though this is the same size, as the sizeof() is derived from the -source expression, recent gcc versions will emit a warning, which is -turned into an error by -Werror: - - error: argument to ‘sizeof’ in ‘strncpy’ call is the same expression - as the source; did you mean to use the size of the destination? - [-Werror=sizeof-pointer-memaccess] - -Signed-off-by: Guillem Jover ---- - harness/cases/19.t | 2 +- - harness/cases/21.t | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/harness/cases/19.t b/harness/cases/19.t -index 4989510..5c3e0d6 100644 ---- a/harness/cases/19.t -+++ b/harness/cases/19.t -@@ -41,7 +41,7 @@ open_temp_file(void) - int fd; - char template[sizeof(TEMPLATE)]; - -- strncpy(template, TEMPLATE, sizeof(TEMPLATE)); -+ strncpy(template, TEMPLATE, sizeof(template)); - fd = mkostemp(template, O_DIRECT); - if (fd < 0) { - perror("mkstemp"); -diff --git a/harness/cases/21.t b/harness/cases/21.t -index 441eaa8..fe33a9d 100644 ---- a/harness/cases/21.t -+++ b/harness/cases/21.t -@@ -43,7 +43,7 @@ open_temp_file() - int fd; - char temp_file[sizeof(TEMPLATE)]; - -- strncpy(temp_file, TEMPLATE, sizeof(TEMPLATE)); -+ strncpy(temp_file, TEMPLATE, sizeof(temp_file)); - fd = mkstemp(temp_file); - if (fd < 0) { - perror("mkstemp"); --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0001-Link-against-libgcc-to-avoid-unresolved-symbols.patch libaio-0.3.112/debian/patches/0001-Link-against-libgcc-to-avoid-unresolved-symbols.patch --- libaio-0.3.112/debian/patches/0001-Link-against-libgcc-to-avoid-unresolved-symbols.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0001-Link-against-libgcc-to-avoid-unresolved-symbols.patch 2019-08-16 02:46:56.000000000 +0000 @@ -0,0 +1,54 @@ +From 672eaebd131c789a528e3a9cd089b4b69a82012b Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Fri, 28 Sep 2018 13:15:54 +0300 +Subject: [PATCH libaio] Link against libgcc to avoid unresolved symbols + +We need to link agaisnt -lgcc, on at least hppa, PPC and ARC. +That's because in some corner-cases like compilation with -Os +on ARC and PPC so-called millicode (basically function prologue and +epilogue) implemented in libgcc.a is used. So we end up with +GLOBAL UNDEFINED symbol in libaio.so and then on linkage of the final +applicaiton LD fails to proceed saying: +--------------------------->8---------------------- +hidden symbol '__ld_r13_to_r15_ret' in .../libgcc.a(_millicodethunk_ret.o) is referenced by DSO +--------------------------->8---------------------- + +Also it looks like in general it is not the best idea to use either +"-nostartfiles" or "-nostdlib" when linking shared libs because +default construtor/destructor functions won't be executed, see +"5.2. Library constructor and destructor functions" in [1] + +So let's stop passing "-nostdlib" and "-nostartfiles" and get required +stuff built-in libaio. + +Initial patch taken from Debian [2]. + +Fixes build failures in Buildroot like blktrace [3], lvm2 [4]. + +[1] http://tldp.org/HOWTO/Program-Library-HOWTO/miscellaneous.html +[2] https://sources.debian.org/patches/libaio/0.3.111-1/01_link_libs.patch/ +[3] http://autobuild.buildroot.net/results/17461209755038a30118d76acb4f43469a22a139/ +[4] http://autobuild.buildroot.net/results/a5dfc87f94b97135e5cc84f6a876114891ed9dd9/ + +Signed-off-by: Guillem Jover +Signed-off-by: Alexey Brodkin +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index eadb336..5911c81 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -3,7 +3,7 @@ includedir=$(prefix)/include + libdir=$(prefix)/lib + + CFLAGS ?= -g -fomit-frame-pointer -O2 +-CFLAGS += -nostdlib -nostartfiles -Wall -I. -fPIC ++CFLAGS += -Wall -I. -fPIC + SO_CFLAGS=-shared $(CFLAGS) + L_CFLAGS=$(CFLAGS) + LINK_FLAGS= +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0001-man-Add-missing-space-in-man-page-references.patch libaio-0.3.112/debian/patches/0001-man-Add-missing-space-in-man-page-references.patch --- libaio-0.3.112/debian/patches/0001-man-Add-missing-space-in-man-page-references.patch 2019-02-25 01:49:18.000000000 +0000 +++ libaio-0.3.112/debian/patches/0001-man-Add-missing-space-in-man-page-references.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,467 +0,0 @@ -From 82725960523a81055cb2f21967c9976362663278 Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Sun, 13 Aug 2017 20:40:01 +0200 -Subject: [PATCH 01/15] man: Add missing space in man page references - -Signed-off-by: Guillem Jover ---- - man/io.3 | 26 +++++++++++++------------- - man/io_cancel.3 | 26 +++++++++++++------------- - man/io_fsync.3 | 24 ++++++++++++------------ - man/io_getevents.3 | 28 ++++++++++++++-------------- - man/io_prep_fsync.3 | 26 +++++++++++++------------- - man/io_prep_pread.3 | 26 +++++++++++++------------- - man/io_prep_pwrite.3 | 26 +++++++++++++------------- - man/io_queue_init.3 | 26 +++++++++++++------------- - man/io_queue_release.3 | 24 ++++++++++++------------ - man/io_queue_run.3 | 26 +++++++++++++------------- - man/io_queue_wait.3 | 26 +++++++++++++------------- - man/io_set_callback.3 | 26 +++++++++++++------------- - man/io_submit.3 | 26 +++++++++++++------------- - 13 files changed, 168 insertions(+), 168 deletions(-) - -diff --git a/man/io.3 b/man/io.3 -index d910a68..968b1f9 100644 ---- a/man/io.3 -+++ b/man/io.3 -@@ -336,16 +336,16 @@ int main(int argc, char *const *argv) - */ - .fi - .SH "SEE ALSO" --.BR io_cancel(3), --.BR io_fsync(3), --.BR io_getevents(3), --.BR io_prep_fsync(3), --.BR io_prep_pread(3), --.BR io_prep_pwrite(3), --.BR io_queue_init(3), --.BR io_queue_release(3), --.BR io_queue_run(3), --.BR io_queue_wait(3), --.BR io_set_callback(3), --.BR io_submit(3), --.BR errno(3) -+.BR io_cancel (3), -+.BR io_fsync (3), -+.BR io_getevents (3), -+.BR io_prep_fsync (3), -+.BR io_prep_pread (3), -+.BR io_prep_pwrite (3), -+.BR io_queue_init (3), -+.BR io_queue_release (3), -+.BR io_queue_run (3), -+.BR io_queue_wait (3), -+.BR io_set_callback (3), -+.BR io_submit (3), -+.BR errno (3). -diff --git a/man/io_cancel.3 b/man/io_cancel.3 -index 9a16084..3cf1bc6 100644 ---- a/man/io_cancel.3 -+++ b/man/io_cancel.3 -@@ -50,16 +50,16 @@ cancelled. - .B ENOSYS - if not implemented. - .SH "SEE ALSO" --.BR io(3), --.BR io_fsync(3), --.BR io_getevents(3), --.BR io_prep_fsync(3), --.BR io_prep_pread(3), --.BR io_prep_pwrite(3), --.BR io_queue_init(3), --.BR io_queue_release(3), --.BR io_queue_run(3), --.BR io_queue_wait(3), --.BR io_set_callback(3), --.BR io_submit(3), --.BR errno(3) -+.BR io (3), -+.BR io_fsync (3), -+.BR io_getevents (3), -+.BR io_prep_fsync (3), -+.BR io_prep_pread (3), -+.BR io_prep_pwrite (3), -+.BR io_queue_init (3), -+.BR io_queue_release (3), -+.BR io_queue_run (3), -+.BR io_queue_wait (3), -+.BR io_set_callback (3), -+.BR io_submit (3), -+.BR errno (3). -diff --git a/man/io_fsync.3 b/man/io_fsync.3 -index 53eb63d..859de1b 100644 ---- a/man/io_fsync.3 -+++ b/man/io_fsync.3 -@@ -68,15 +68,15 @@ The iocb contains a file descriptor that does not exist. - .B EINVAL - The file specified in the iocb does not support the given io operation. - .SH "SEE ALSO" --.BR io(3), --.BR io_cancel(3), --.BR io_getevents(3), --.BR io_prep_pread(3), --.BR io_prep_pwrite(3), --.BR io_queue_init(3), --.BR io_queue_release(3), --.BR io_queue_run(3), --.BR io_queue_wait(3), --.BR io_set_callback(3), --.BR io_submit(3), --.BR errno(3) -+.BR io (3), -+.BR io_cancel (3), -+.BR io_getevents (3), -+.BR io_prep_pread (3), -+.BR io_prep_pwrite (3), -+.BR io_queue_init (3), -+.BR io_queue_release (3), -+.BR io_queue_run (3), -+.BR io_queue_wait (3), -+.BR io_set_callback (3), -+.BR io_submit (3), -+.BR errno (3). -diff --git a/man/io_getevents.3 b/man/io_getevents.3 -index 5062daa..a4f8b57 100644 ---- a/man/io_getevents.3 -+++ b/man/io_getevents.3 -@@ -118,17 +118,17 @@ if nr is out of range, if when is out of range. - .B EFAULT - if any of the memory specified to is invalid. - .SH "SEE ALSO" --.BR io(3), --.BR io_cancel(3), --.BR io_fsync(3), --.BR io_prep_fsync(3), --.BR io_prep_pread(3), --.BR io_prep_pwrite(3), --.BR io_queue_init(3), --.BR io_queue_release(3), --.BR io_queue_run(3), --.BR io_queue_wait(3), --.BR io_set_callback(3), --.BR io_submit(3), --.BR errno(3), --.BR pselect(2) -+.BR io (3), -+.BR io_cancel (3), -+.BR io_fsync (3), -+.BR io_prep_fsync (3), -+.BR io_prep_pread (3), -+.BR io_prep_pwrite (3), -+.BR io_queue_init (3), -+.BR io_queue_release (3), -+.BR io_queue_run (3), -+.BR io_queue_wait (3), -+.BR io_set_callback (3), -+.BR io_submit (3), -+.BR errno (3), -+.BR pselect (2). -diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3 -index 4cf935a..1173e2a 100644 ---- a/man/io_prep_fsync.3 -+++ b/man/io_prep_fsync.3 -@@ -74,16 +74,16 @@ None - .SH ERRORS - None - .SH "SEE ALSO" --.BR io(3), --.BR io_cancel(3), --.BR io_fsync(3), --.BR io_getevents(3), --.BR io_prep_pread(3), --.BR io_prep_pwrite(3), --.BR io_queue_init(3), --.BR io_queue_release(3), --.BR io_queue_run(3), --.BR io_queue_wait(3), --.BR io_set_callback(3), --.BR io_submit(3), --.BR errno(3) -+.BR io (3), -+.BR io_cancel (3), -+.BR io_fsync (3), -+.BR io_getevents (3), -+.BR io_prep_pread (3), -+.BR io_prep_pwrite (3), -+.BR io_queue_init (3), -+.BR io_queue_release (3), -+.BR io_queue_run (3), -+.BR io_queue_wait (3), -+.BR io_set_callback (3), -+.BR io_submit (3), -+.BR errno (3). -diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3 -index 5938aec..2c3b314 100644 ---- a/man/io_prep_pread.3 -+++ b/man/io_prep_pread.3 -@@ -64,16 +64,16 @@ None - .SH ERRORS - None - .SH "SEE ALSO" --.BR io(3), --.BR io_cancel(3), --.BR io_fsync(3), --.BR io_getevents(3), --.BR io_prep_fsync(3), --.BR io_prep_pwrite(3), --.BR io_queue_init(3), --.BR io_queue_release(3), --.BR io_queue_run(3), --.BR io_queue_wait(3), --.BR io_set_callback(3), --.BR io_submit(3), --.BR errno(3) -+.BR io (3), -+.BR io_cancel (3), -+.BR io_fsync (3), -+.BR io_getevents (3), -+.BR io_prep_fsync (3), -+.BR io_prep_pwrite (3), -+.BR io_queue_init (3), -+.BR io_queue_release (3), -+.BR io_queue_run (3), -+.BR io_queue_wait (3), -+.BR io_set_callback (3), -+.BR io_submit (3), -+.BR errno (3). -diff --git a/man/io_prep_pwrite.3 b/man/io_prep_pwrite.3 -index 68b3500..669b8c2 100644 ---- a/man/io_prep_pwrite.3 -+++ b/man/io_prep_pwrite.3 -@@ -62,16 +62,16 @@ None - .SH ERRORS - None - .SH "SEE ALSO" --.BR io(3), --.BR io_cancel(3), --.BR io_fsync(3), --.BR io_getevents(3), --.BR io_prep_fsync(3), --.BR io_prep_pread(3), --.BR io_queue_init(3), --.BR io_queue_release(3), --.BR io_queue_run(3), --.BR io_queue_wait(3), --.BR io_set_callback(3), --.BR io_submit(3), --.BR errno(3) -+.BR io (3), -+.BR io_cancel (3), -+.BR io_fsync (3), -+.BR io_getevents (3), -+.BR io_prep_fsync (3), -+.BR io_prep_pread (3), -+.BR io_queue_init (3), -+.BR io_queue_release (3), -+.BR io_queue_run (3), -+.BR io_queue_wait (3), -+.BR io_set_callback (3), -+.BR io_submit (3), -+.BR errno (3). -diff --git a/man/io_queue_init.3 b/man/io_queue_init.3 -index 317f631..7531f51 100644 ---- a/man/io_queue_init.3 -+++ b/man/io_queue_init.3 -@@ -48,16 +48,16 @@ Not implemented - .IR "maxevents > max_aio_reqs" - where max_aio_reqs is a tunable value. - .SH "SEE ALSO" --.BR io(3), --.BR io_cancel(3), --.BR io_fsync(3), --.BR io_getevents(3), --.BR io_prep_fsync(3), --.BR io_prep_pread(3), --.BR io_prep_pwrite(3), --.BR io_queue_release(3), --.BR io_queue_run(3), --.BR io_queue_wait(3), --.BR io_set_callback(3), --.BR io_submit(3), --.BR errno(3) -+.BR io (3), -+.BR io_cancel (3), -+.BR io_fsync (3), -+.BR io_getevents (3), -+.BR io_prep_fsync (3), -+.BR io_prep_pread (3), -+.BR io_prep_pwrite (3), -+.BR io_queue_release (3), -+.BR io_queue_run (3), -+.BR io_queue_wait (3), -+.BR io_set_callback (3), -+.BR io_submit (3), -+.BR errno (3). -diff --git a/man/io_queue_release.3 b/man/io_queue_release.3 -index 06b9ec0..9df39a0 100644 ---- a/man/io_queue_release.3 -+++ b/man/io_queue_release.3 -@@ -32,17 +32,17 @@ contains an improperly initialized iocb, - .B ENOSYS - Not implemented - .SH "SEE ALSO" --.BR io(3), --.BR io_cancel(3), --.BR io_fsync(3), --.BR io_getevents(3), --.BR io_prep_fsync(3), --.BR io_prep_pread(3), --.BR io_prep_pwrite(3), --.BR io_queue_init(3), --.BR io_queue_run(3), -+.BR io (3), -+.BR io_cancel (3), -+.BR io_fsync (3), -+.BR io_getevents (3), -+.BR io_prep_fsync (3), -+.BR io_prep_pread (3), -+.BR io_prep_pwrite (3), -+.BR io_queue_init (3), -+.BR io_queue_run (3), - .BR io_queue_wait(3), --.BR io_set_callback(3), --.BR io_submit(3), --.BR errno(3) -+.BR io_set_callback (3), -+.BR io_submit (3), -+.BR errno (3). - -diff --git a/man/io_queue_run.3 b/man/io_queue_run.3 -index 57dd417..45762f5 100644 ---- a/man/io_queue_run.3 -+++ b/man/io_queue_run.3 -@@ -35,16 +35,16 @@ contains an improperly initialized iocb, - .B ENOSYS - Not implemented - .SH "SEE ALSO" --.BR io(3), --.BR io_cancel(3), --.BR io_fsync(3), --.BR io_getevents(3), --.BR io_prep_fsync(3), --.BR io_prep_pread(3), --.BR io_prep_pwrite(3), --.BR io_queue_init(3), --.BR io_queue_release(3), --.BR io_queue_wait(3), --.BR io_set_callback(3), --.BR io_submit(3), --.BR errno(3) -+.BR io (3), -+.BR io_cancel (3), -+.BR io_fsync (3), -+.BR io_getevents (3), -+.BR io_prep_fsync (3), -+.BR io_prep_pread (3), -+.BR io_prep_pwrite (3), -+.BR io_queue_init (3), -+.BR io_queue_release (3), -+.BR io_queue_wait (3), -+.BR io_set_callback (3), -+.BR io_submit (3), -+.BR errno (3). -diff --git a/man/io_queue_wait.3 b/man/io_queue_wait.3 -index 2306663..2c7fc2c 100644 ---- a/man/io_queue_wait.3 -+++ b/man/io_queue_wait.3 -@@ -41,16 +41,16 @@ contains an improperly initialized iocb, - .B ENOSYS - Not implemented - .SH "SEE ALSO" --.BR io(3), --.BR io_cancel(3), --.BR io_fsync(3), --.BR io_getevents(3), --.BR io_prep_fsync(3), --.BR io_prep_pread(3), --.BR io_prep_pwrite(3), --.BR io_queue_init(3), --.BR io_queue_release(3), --.BR io_queue_run(3), --.BR io_set_callback(3), --.BR io_submit(3), --.BR errno(3) -+.BR io (3), -+.BR io_cancel (3), -+.BR io_fsync (3), -+.BR io_getevents (3), -+.BR io_prep_fsync (3), -+.BR io_prep_pread (3), -+.BR io_prep_pwrite (3), -+.BR io_queue_init (3), -+.BR io_queue_release (3), -+.BR io_queue_run (3), -+.BR io_set_callback (3), -+.BR io_submit (3), -+.BR errno (3). -diff --git a/man/io_set_callback.3 b/man/io_set_callback.3 -index a8ca789..3c7e43f 100644 ---- a/man/io_set_callback.3 -+++ b/man/io_set_callback.3 -@@ -29,16 +29,16 @@ io_getevents, only with the library helpers - .SH "RETURN VALUES" - .SH ERRORS - .SH "SEE ALSO" --.BR io(3), --.BR io_cancel(3), --.BR io_fsync(3), --.BR io_getevents(3), --.BR io_prep_fsync(3), --.BR io_prep_pread(3), --.BR io_prep_pwrite(3), --.BR io_queue_init(3), --.BR io_queue_release(3), --.BR io_queue_run(3), --.BR io_queue_wait(3), --.BR io_submit(3), --.BR errno(3) -+.BR io (3), -+.BR io_cancel (3), -+.BR io_fsync (3), -+.BR io_getevents (3), -+.BR io_prep_fsync (3), -+.BR io_prep_pread (3), -+.BR io_prep_pwrite (3), -+.BR io_queue_init (3), -+.BR io_queue_release (3), -+.BR io_queue_run (3), -+.BR io_queue_wait (3), -+.BR io_submit (3), -+.BR errno (3). -diff --git a/man/io_submit.3 b/man/io_submit.3 -index b6966ef..7281147 100644 ---- a/man/io_submit.3 -+++ b/man/io_submit.3 -@@ -120,16 +120,16 @@ The iocb contains a file descriptor that does not exist. - .B EINVAL - The file specified in the iocb does not support the given io operation. - .SH "SEE ALSO" --.BR io(3), --.BR io_cancel(3), --.BR io_fsync(3), --.BR io_getevents(3), --.BR io_prep_fsync(3), --.BR io_prep_pread(3), --.BR io_prep_pwrite(3), --.BR io_queue_init(3), --.BR io_queue_release(3), --.BR io_queue_run(3), --.BR io_queue_wait(3), --.BR io_set_callback(3), --.BR errno(3) -+.BR io (3), -+.BR io_cancel (3), -+.BR io_fsync (3), -+.BR io_getevents (3), -+.BR io_prep_fsync (3), -+.BR io_prep_pread (3), -+.BR io_prep_pwrite (3), -+.BR io_queue_init (3), -+.BR io_queue_release (3), -+.BR io_queue_run (3), -+.BR io_queue_wait (3), -+.BR io_set_callback (3), -+.BR errno (3). --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0002-harness-Use-run-time-_SC_PAGE_SIZE-instead-of-build-.patch libaio-0.3.112/debian/patches/0002-harness-Use-run-time-_SC_PAGE_SIZE-instead-of-build-.patch --- libaio-0.3.112/debian/patches/0002-harness-Use-run-time-_SC_PAGE_SIZE-instead-of-build-.patch 2019-02-26 02:34:09.000000000 +0000 +++ libaio-0.3.112/debian/patches/0002-harness-Use-run-time-_SC_PAGE_SIZE-instead-of-build-.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,115 +0,0 @@ -From ce13c8eb716beec3b6a83285a6295212cbf3ce80 Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Sat, 9 Feb 2019 00:28:53 +0100 -Subject: [PATCH 2/7] harness: Use run-time _SC_PAGE_SIZE instead of build-time - PAGESIZE - -The getconf(1) command is inherently not cross-compilation friendly. -In addition PAGESIZE depends on the specific system, even within a -specific arch, so using a hard-coded value is never safe. - -Signed-off-by: Guillem Jover ---- - harness/Makefile | 2 +- - harness/cases/18.t | 34 ++++++++++++++++++++++++---------- - 2 files changed, 25 insertions(+), 11 deletions(-) - -diff --git a/harness/Makefile b/harness/Makefile -index f477737..a3c3b46 100644 ---- a/harness/Makefile -+++ b/harness/Makefile -@@ -6,7 +6,7 @@ PROGS:=$(PARTPROGS) $(EXTRAPROGS) - HARNESS_SRCS:=main.c - # io_queue.c - --MK_CPPFLAGS := -I../src -DPAGE_SIZE=$(shell getconf PAGESIZE) $(CPPFLAGS) -+MK_CPPFLAGS := -I../src $(CPPFLAGS) - CFLAGS = -Wall -g -O2 - #-lpthread -lrt - MK_CFLAGS = $(CFLAGS) -diff --git a/harness/cases/18.t b/harness/cases/18.t -index 5587ceb..daa1d26 100644 ---- a/harness/cases/18.t -+++ b/harness/cases/18.t -@@ -40,11 +40,17 @@ - - #define THREADS_NUM 100 - -+static size_t page_size; -+ - void - aio_worker(void *ptr) - { -- int i, j, fd; -- char buffer[PAGE_SIZE] __attribute__((aligned(PAGE_SIZE))); -+ int i, j, fd, ret; -+ char *buffer = NULL; -+ -+ ret = posix_memalign((void **)&buffer, page_size, page_size); -+ assert(ret == 0); -+ assert(buffer != NULL); - - fd = open(FILENAME, O_DIRECT|O_RDONLY); - assert(fd >= 0); -@@ -55,19 +61,19 @@ aio_worker(void *ptr) - struct iocb *cbs[1]; - - assert(!io_queue_init(1, &ctx)); -- io_prep_pread(&cb, fd, buffer, PAGE_SIZE, 0); -+ io_prep_pread(&cb, fd, buffer, page_size, 0); - cbs[0] = &cb; - -- memset(buffer, '0', PAGE_SIZE); -+ memset(buffer, '0', page_size); - assert(io_submit(ctx, 1, &cbs[0]) == 1); - // wait random time (0-500ms) ? - - io_destroy(ctx); -- memset(buffer, DESTROY_PATTERN, PAGE_SIZE); -+ memset(buffer, DESTROY_PATTERN, page_size); - // wait random for (0-500ms) ? - - // check it is still DESTROY_PATTERN -- for (j = 0; j < PAGE_SIZE; j++) { -+ for (j = 0; j < page_size; j++) { - if (buffer[j] != DESTROY_PATTERN) { - fprintf(stderr, - "Buffer has unexpected character: %c\n", -@@ -77,6 +83,7 @@ aio_worker(void *ptr) - } - } - -+ free(buffer); - close(fd); - } - -@@ -84,15 +91,22 @@ int - test_main(void) - { - int i, fd, ret; -- char buffer[PAGE_SIZE]; -+ char *buffer = NULL; - pthread_t threads[THREADS_NUM]; - -+ page_size = sysconf(_SC_PAGESIZE); -+ assert(page_size >= 1); -+ -+ ret = posix_memalign((void **)&buffer, page_size, page_size); -+ assert(ret == 0); -+ assert(buffer != NULL); -+ - fd = open(FILENAME, O_CREAT|O_TRUNC|O_APPEND|O_RDWR, S_IRUSR|S_IWUSR); - assert(fd != -1); - -- memset(buffer, FILEPATTERN, PAGE_SIZE); -- ret = write(fd, buffer, PAGE_SIZE); -- assert(ret == PAGE_SIZE); -+ memset(buffer, FILEPATTERN, page_size); -+ ret = write(fd, buffer, page_size); -+ assert(ret == page_size); - close(fd); - - for (i = 0; i < THREADS_NUM; i++) { --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0002-man-Add-missing-space-in-man-page-references.patch libaio-0.3.112/debian/patches/0002-man-Add-missing-space-in-man-page-references.patch --- libaio-0.3.112/debian/patches/0002-man-Add-missing-space-in-man-page-references.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0002-man-Add-missing-space-in-man-page-references.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,468 @@ +From aef192335a7f16384c4b95a2cc2ce9c46fa72e02 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:18:00 +0200 +Subject: [PATCH libaio 02/26] man: Add missing space in man page references + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + man/io.3 | 26 +++++++++++++------------- + man/io_cancel.3 | 26 +++++++++++++------------- + man/io_fsync.3 | 24 ++++++++++++------------ + man/io_getevents.3 | 28 ++++++++++++++-------------- + man/io_prep_fsync.3 | 26 +++++++++++++------------- + man/io_prep_pread.3 | 26 +++++++++++++------------- + man/io_prep_pwrite.3 | 26 +++++++++++++------------- + man/io_queue_init.3 | 26 +++++++++++++------------- + man/io_queue_release.3 | 24 ++++++++++++------------ + man/io_queue_run.3 | 26 +++++++++++++------------- + man/io_queue_wait.3 | 26 +++++++++++++------------- + man/io_set_callback.3 | 26 +++++++++++++------------- + man/io_submit.3 | 26 +++++++++++++------------- + 13 files changed, 168 insertions(+), 168 deletions(-) + +diff --git a/man/io.3 b/man/io.3 +index d910a68..968b1f9 100644 +--- a/man/io.3 ++++ b/man/io.3 +@@ -336,16 +336,16 @@ int main(int argc, char *const *argv) + */ + .fi + .SH "SEE ALSO" +-.BR io_cancel(3), +-.BR io_fsync(3), +-.BR io_getevents(3), +-.BR io_prep_fsync(3), +-.BR io_prep_pread(3), +-.BR io_prep_pwrite(3), +-.BR io_queue_init(3), +-.BR io_queue_release(3), +-.BR io_queue_run(3), +-.BR io_queue_wait(3), +-.BR io_set_callback(3), +-.BR io_submit(3), +-.BR errno(3) ++.BR io_cancel (3), ++.BR io_fsync (3), ++.BR io_getevents (3), ++.BR io_prep_fsync (3), ++.BR io_prep_pread (3), ++.BR io_prep_pwrite (3), ++.BR io_queue_init (3), ++.BR io_queue_release (3), ++.BR io_queue_run (3), ++.BR io_queue_wait (3), ++.BR io_set_callback (3), ++.BR io_submit (3), ++.BR errno (3). +diff --git a/man/io_cancel.3 b/man/io_cancel.3 +index 9a16084..3cf1bc6 100644 +--- a/man/io_cancel.3 ++++ b/man/io_cancel.3 +@@ -50,16 +50,16 @@ cancelled. + .B ENOSYS + if not implemented. + .SH "SEE ALSO" +-.BR io(3), +-.BR io_fsync(3), +-.BR io_getevents(3), +-.BR io_prep_fsync(3), +-.BR io_prep_pread(3), +-.BR io_prep_pwrite(3), +-.BR io_queue_init(3), +-.BR io_queue_release(3), +-.BR io_queue_run(3), +-.BR io_queue_wait(3), +-.BR io_set_callback(3), +-.BR io_submit(3), +-.BR errno(3) ++.BR io (3), ++.BR io_fsync (3), ++.BR io_getevents (3), ++.BR io_prep_fsync (3), ++.BR io_prep_pread (3), ++.BR io_prep_pwrite (3), ++.BR io_queue_init (3), ++.BR io_queue_release (3), ++.BR io_queue_run (3), ++.BR io_queue_wait (3), ++.BR io_set_callback (3), ++.BR io_submit (3), ++.BR errno (3). +diff --git a/man/io_fsync.3 b/man/io_fsync.3 +index 53eb63d..859de1b 100644 +--- a/man/io_fsync.3 ++++ b/man/io_fsync.3 +@@ -68,15 +68,15 @@ The iocb contains a file descriptor that does not exist. + .B EINVAL + The file specified in the iocb does not support the given io operation. + .SH "SEE ALSO" +-.BR io(3), +-.BR io_cancel(3), +-.BR io_getevents(3), +-.BR io_prep_pread(3), +-.BR io_prep_pwrite(3), +-.BR io_queue_init(3), +-.BR io_queue_release(3), +-.BR io_queue_run(3), +-.BR io_queue_wait(3), +-.BR io_set_callback(3), +-.BR io_submit(3), +-.BR errno(3) ++.BR io (3), ++.BR io_cancel (3), ++.BR io_getevents (3), ++.BR io_prep_pread (3), ++.BR io_prep_pwrite (3), ++.BR io_queue_init (3), ++.BR io_queue_release (3), ++.BR io_queue_run (3), ++.BR io_queue_wait (3), ++.BR io_set_callback (3), ++.BR io_submit (3), ++.BR errno (3). +diff --git a/man/io_getevents.3 b/man/io_getevents.3 +index 5062daa..a4f8b57 100644 +--- a/man/io_getevents.3 ++++ b/man/io_getevents.3 +@@ -118,17 +118,17 @@ if nr is out of range, if when is out of range. + .B EFAULT + if any of the memory specified to is invalid. + .SH "SEE ALSO" +-.BR io(3), +-.BR io_cancel(3), +-.BR io_fsync(3), +-.BR io_prep_fsync(3), +-.BR io_prep_pread(3), +-.BR io_prep_pwrite(3), +-.BR io_queue_init(3), +-.BR io_queue_release(3), +-.BR io_queue_run(3), +-.BR io_queue_wait(3), +-.BR io_set_callback(3), +-.BR io_submit(3), +-.BR errno(3), +-.BR pselect(2) ++.BR io (3), ++.BR io_cancel (3), ++.BR io_fsync (3), ++.BR io_prep_fsync (3), ++.BR io_prep_pread (3), ++.BR io_prep_pwrite (3), ++.BR io_queue_init (3), ++.BR io_queue_release (3), ++.BR io_queue_run (3), ++.BR io_queue_wait (3), ++.BR io_set_callback (3), ++.BR io_submit (3), ++.BR errno (3), ++.BR pselect (2). +diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3 +index 4cf935a..1173e2a 100644 +--- a/man/io_prep_fsync.3 ++++ b/man/io_prep_fsync.3 +@@ -74,16 +74,16 @@ None + .SH ERRORS + None + .SH "SEE ALSO" +-.BR io(3), +-.BR io_cancel(3), +-.BR io_fsync(3), +-.BR io_getevents(3), +-.BR io_prep_pread(3), +-.BR io_prep_pwrite(3), +-.BR io_queue_init(3), +-.BR io_queue_release(3), +-.BR io_queue_run(3), +-.BR io_queue_wait(3), +-.BR io_set_callback(3), +-.BR io_submit(3), +-.BR errno(3) ++.BR io (3), ++.BR io_cancel (3), ++.BR io_fsync (3), ++.BR io_getevents (3), ++.BR io_prep_pread (3), ++.BR io_prep_pwrite (3), ++.BR io_queue_init (3), ++.BR io_queue_release (3), ++.BR io_queue_run (3), ++.BR io_queue_wait (3), ++.BR io_set_callback (3), ++.BR io_submit (3), ++.BR errno (3). +diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3 +index 5938aec..2c3b314 100644 +--- a/man/io_prep_pread.3 ++++ b/man/io_prep_pread.3 +@@ -64,16 +64,16 @@ None + .SH ERRORS + None + .SH "SEE ALSO" +-.BR io(3), +-.BR io_cancel(3), +-.BR io_fsync(3), +-.BR io_getevents(3), +-.BR io_prep_fsync(3), +-.BR io_prep_pwrite(3), +-.BR io_queue_init(3), +-.BR io_queue_release(3), +-.BR io_queue_run(3), +-.BR io_queue_wait(3), +-.BR io_set_callback(3), +-.BR io_submit(3), +-.BR errno(3) ++.BR io (3), ++.BR io_cancel (3), ++.BR io_fsync (3), ++.BR io_getevents (3), ++.BR io_prep_fsync (3), ++.BR io_prep_pwrite (3), ++.BR io_queue_init (3), ++.BR io_queue_release (3), ++.BR io_queue_run (3), ++.BR io_queue_wait (3), ++.BR io_set_callback (3), ++.BR io_submit (3), ++.BR errno (3). +diff --git a/man/io_prep_pwrite.3 b/man/io_prep_pwrite.3 +index 68b3500..669b8c2 100644 +--- a/man/io_prep_pwrite.3 ++++ b/man/io_prep_pwrite.3 +@@ -62,16 +62,16 @@ None + .SH ERRORS + None + .SH "SEE ALSO" +-.BR io(3), +-.BR io_cancel(3), +-.BR io_fsync(3), +-.BR io_getevents(3), +-.BR io_prep_fsync(3), +-.BR io_prep_pread(3), +-.BR io_queue_init(3), +-.BR io_queue_release(3), +-.BR io_queue_run(3), +-.BR io_queue_wait(3), +-.BR io_set_callback(3), +-.BR io_submit(3), +-.BR errno(3) ++.BR io (3), ++.BR io_cancel (3), ++.BR io_fsync (3), ++.BR io_getevents (3), ++.BR io_prep_fsync (3), ++.BR io_prep_pread (3), ++.BR io_queue_init (3), ++.BR io_queue_release (3), ++.BR io_queue_run (3), ++.BR io_queue_wait (3), ++.BR io_set_callback (3), ++.BR io_submit (3), ++.BR errno (3). +diff --git a/man/io_queue_init.3 b/man/io_queue_init.3 +index 317f631..7531f51 100644 +--- a/man/io_queue_init.3 ++++ b/man/io_queue_init.3 +@@ -48,16 +48,16 @@ Not implemented + .IR "maxevents > max_aio_reqs" + where max_aio_reqs is a tunable value. + .SH "SEE ALSO" +-.BR io(3), +-.BR io_cancel(3), +-.BR io_fsync(3), +-.BR io_getevents(3), +-.BR io_prep_fsync(3), +-.BR io_prep_pread(3), +-.BR io_prep_pwrite(3), +-.BR io_queue_release(3), +-.BR io_queue_run(3), +-.BR io_queue_wait(3), +-.BR io_set_callback(3), +-.BR io_submit(3), +-.BR errno(3) ++.BR io (3), ++.BR io_cancel (3), ++.BR io_fsync (3), ++.BR io_getevents (3), ++.BR io_prep_fsync (3), ++.BR io_prep_pread (3), ++.BR io_prep_pwrite (3), ++.BR io_queue_release (3), ++.BR io_queue_run (3), ++.BR io_queue_wait (3), ++.BR io_set_callback (3), ++.BR io_submit (3), ++.BR errno (3). +diff --git a/man/io_queue_release.3 b/man/io_queue_release.3 +index 06b9ec0..9df39a0 100644 +--- a/man/io_queue_release.3 ++++ b/man/io_queue_release.3 +@@ -32,17 +32,17 @@ contains an improperly initialized iocb, + .B ENOSYS + Not implemented + .SH "SEE ALSO" +-.BR io(3), +-.BR io_cancel(3), +-.BR io_fsync(3), +-.BR io_getevents(3), +-.BR io_prep_fsync(3), +-.BR io_prep_pread(3), +-.BR io_prep_pwrite(3), +-.BR io_queue_init(3), +-.BR io_queue_run(3), ++.BR io (3), ++.BR io_cancel (3), ++.BR io_fsync (3), ++.BR io_getevents (3), ++.BR io_prep_fsync (3), ++.BR io_prep_pread (3), ++.BR io_prep_pwrite (3), ++.BR io_queue_init (3), ++.BR io_queue_run (3), + .BR io_queue_wait(3), +-.BR io_set_callback(3), +-.BR io_submit(3), +-.BR errno(3) ++.BR io_set_callback (3), ++.BR io_submit (3), ++.BR errno (3). + +diff --git a/man/io_queue_run.3 b/man/io_queue_run.3 +index 57dd417..45762f5 100644 +--- a/man/io_queue_run.3 ++++ b/man/io_queue_run.3 +@@ -35,16 +35,16 @@ contains an improperly initialized iocb, + .B ENOSYS + Not implemented + .SH "SEE ALSO" +-.BR io(3), +-.BR io_cancel(3), +-.BR io_fsync(3), +-.BR io_getevents(3), +-.BR io_prep_fsync(3), +-.BR io_prep_pread(3), +-.BR io_prep_pwrite(3), +-.BR io_queue_init(3), +-.BR io_queue_release(3), +-.BR io_queue_wait(3), +-.BR io_set_callback(3), +-.BR io_submit(3), +-.BR errno(3) ++.BR io (3), ++.BR io_cancel (3), ++.BR io_fsync (3), ++.BR io_getevents (3), ++.BR io_prep_fsync (3), ++.BR io_prep_pread (3), ++.BR io_prep_pwrite (3), ++.BR io_queue_init (3), ++.BR io_queue_release (3), ++.BR io_queue_wait (3), ++.BR io_set_callback (3), ++.BR io_submit (3), ++.BR errno (3). +diff --git a/man/io_queue_wait.3 b/man/io_queue_wait.3 +index 2306663..2c7fc2c 100644 +--- a/man/io_queue_wait.3 ++++ b/man/io_queue_wait.3 +@@ -41,16 +41,16 @@ contains an improperly initialized iocb, + .B ENOSYS + Not implemented + .SH "SEE ALSO" +-.BR io(3), +-.BR io_cancel(3), +-.BR io_fsync(3), +-.BR io_getevents(3), +-.BR io_prep_fsync(3), +-.BR io_prep_pread(3), +-.BR io_prep_pwrite(3), +-.BR io_queue_init(3), +-.BR io_queue_release(3), +-.BR io_queue_run(3), +-.BR io_set_callback(3), +-.BR io_submit(3), +-.BR errno(3) ++.BR io (3), ++.BR io_cancel (3), ++.BR io_fsync (3), ++.BR io_getevents (3), ++.BR io_prep_fsync (3), ++.BR io_prep_pread (3), ++.BR io_prep_pwrite (3), ++.BR io_queue_init (3), ++.BR io_queue_release (3), ++.BR io_queue_run (3), ++.BR io_set_callback (3), ++.BR io_submit (3), ++.BR errno (3). +diff --git a/man/io_set_callback.3 b/man/io_set_callback.3 +index a8ca789..3c7e43f 100644 +--- a/man/io_set_callback.3 ++++ b/man/io_set_callback.3 +@@ -29,16 +29,16 @@ io_getevents, only with the library helpers + .SH "RETURN VALUES" + .SH ERRORS + .SH "SEE ALSO" +-.BR io(3), +-.BR io_cancel(3), +-.BR io_fsync(3), +-.BR io_getevents(3), +-.BR io_prep_fsync(3), +-.BR io_prep_pread(3), +-.BR io_prep_pwrite(3), +-.BR io_queue_init(3), +-.BR io_queue_release(3), +-.BR io_queue_run(3), +-.BR io_queue_wait(3), +-.BR io_submit(3), +-.BR errno(3) ++.BR io (3), ++.BR io_cancel (3), ++.BR io_fsync (3), ++.BR io_getevents (3), ++.BR io_prep_fsync (3), ++.BR io_prep_pread (3), ++.BR io_prep_pwrite (3), ++.BR io_queue_init (3), ++.BR io_queue_release (3), ++.BR io_queue_run (3), ++.BR io_queue_wait (3), ++.BR io_submit (3), ++.BR errno (3). +diff --git a/man/io_submit.3 b/man/io_submit.3 +index b6966ef..7281147 100644 +--- a/man/io_submit.3 ++++ b/man/io_submit.3 +@@ -120,16 +120,16 @@ The iocb contains a file descriptor that does not exist. + .B EINVAL + The file specified in the iocb does not support the given io operation. + .SH "SEE ALSO" +-.BR io(3), +-.BR io_cancel(3), +-.BR io_fsync(3), +-.BR io_getevents(3), +-.BR io_prep_fsync(3), +-.BR io_prep_pread(3), +-.BR io_prep_pwrite(3), +-.BR io_queue_init(3), +-.BR io_queue_release(3), +-.BR io_queue_run(3), +-.BR io_queue_wait(3), +-.BR io_set_callback(3), +-.BR errno(3) ++.BR io (3), ++.BR io_cancel (3), ++.BR io_fsync (3), ++.BR io_getevents (3), ++.BR io_prep_fsync (3), ++.BR io_prep_pread (3), ++.BR io_prep_pwrite (3), ++.BR io_queue_init (3), ++.BR io_queue_release (3), ++.BR io_queue_run (3), ++.BR io_queue_wait (3), ++.BR io_set_callback (3), ++.BR errno (3). +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0002-man-Use-the-correct-troff-macro-for-comments.patch libaio-0.3.112/debian/patches/0002-man-Use-the-correct-troff-macro-for-comments.patch --- libaio-0.3.112/debian/patches/0002-man-Use-the-correct-troff-macro-for-comments.patch 2019-02-25 01:49:18.000000000 +0000 +++ libaio-0.3.112/debian/patches/0002-man-Use-the-correct-troff-macro-for-comments.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,203 +0,0 @@ -From eb2b0e1a49cf2c3b606b7467899812ebd622abed Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Sun, 13 Aug 2017 20:46:13 +0200 -Subject: [PATCH 02/15] man: Use the correct troff macro for comments - -Signed-off-by: Guillem Jover ---- - man/io_fsync.3 | 12 ++++++------ - man/io_getevents.3 | 36 ++++++++++++++++++------------------ - man/io_prep_fsync.3 | 14 +++++++------- - man/io_prep_pread.3 | 20 ++++++++++---------- - man/io_prep_pwrite.3 | 20 ++++++++++---------- - man/io_set_callback.3 | 2 +- - man/io_submit.3 | 24 ++++++++++++------------ - 7 files changed, 64 insertions(+), 64 deletions(-) - -diff --git a/man/io_fsync.3 b/man/io_fsync.3 -index 859de1b..77a62ff 100644 ---- a/man/io_fsync.3 -+++ b/man/io_fsync.3 -@@ -1,9 +1,9 @@ --./" static inline int io_fsync(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd) --./" { --./" io_prep_fsync(iocb, fd); --./" io_set_callback(iocb, cb); --./" return io_submit(ctx, 1, &iocb); --./" } -+.\" static inline int io_fsync(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd) -+.\" { -+.\" io_prep_fsync(iocb, fd); -+.\" io_set_callback(iocb, cb); -+.\" return io_submit(ctx, 1, &iocb); -+.\" } - .TH io_fsync 3 2002-09-12 "Linux 2.4" Linux AIO" - .SH NAME - io_fsync \- Synchronize a file's complete in-core state with that on disk -diff --git a/man/io_getevents.3 b/man/io_getevents.3 -index a4f8b57..1e643ac 100644 ---- a/man/io_getevents.3 -+++ b/man/io_getevents.3 -@@ -1,21 +1,21 @@ --./"/* io_getevents: --./" * Attempts to read at least min_nr events and up to nr events from --./" * the completion queue for the aio_context specified by ctx_id. May --./" * fail with -EINVAL if ctx_id is invalid, if min_nr is out of range, --./" * if nr is out of range, if when is out of range. May fail with --./" * -EFAULT if any of the memory specified to is invalid. May return --./" * 0 or < min_nr if no events are available and the timeout specified --./" * by when has elapsed, where when == NULL specifies an infinite --./" * timeout. Note that the timeout pointed to by when is relative and --./" * will be updated if not NULL and the operation blocks. Will fail --./" * with -ENOSYS if not implemented. --./" */ --./"asmlinkage long sys_io_getevents(io_context_t ctx_id, --./" long min_nr, --./" long nr, --./" struct io_event *events, --./" struct timespec *timeout) --./" -+.\"/* io_getevents: -+.\" * Attempts to read at least min_nr events and up to nr events from -+.\" * the completion queue for the aio_context specified by ctx_id. May -+.\" * fail with -EINVAL if ctx_id is invalid, if min_nr is out of range, -+.\" * if nr is out of range, if when is out of range. May fail with -+.\" * -EFAULT if any of the memory specified to is invalid. May return -+.\" * 0 or < min_nr if no events are available and the timeout specified -+.\" * by when has elapsed, where when == NULL specifies an infinite -+.\" * timeout. Note that the timeout pointed to by when is relative and -+.\" * will be updated if not NULL and the operation blocks. Will fail -+.\" * with -ENOSYS if not implemented. -+.\" */ -+.\"asmlinkage long sys_io_getevents(io_context_t ctx_id, -+.\" long min_nr, -+.\" long nr, -+.\" struct io_event *events, -+.\" struct timespec *timeout) -+.\" - .TH io_getevents 2 2002-09-03 "Linux 2.4" "Linux AIO" - .SH NAME - io_getevents, aio_pgetevents \- Read resulting events from io requests -diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3 -index 1173e2a..2daddee 100644 ---- a/man/io_prep_fsync.3 -+++ b/man/io_prep_fsync.3 -@@ -1,10 +1,10 @@ --./" static inline void io_prep_fsync(struct iocb *iocb, int fd) --./" { --./" memset(iocb, 0, sizeof(*iocb)); --./" iocb->aio_fildes = fd; --./" iocb->aio_lio_opcode = IO_CMD_FSYNC; --./" iocb->aio_reqprio = 0; --./" } -+.\" static inline void io_prep_fsync(struct iocb *iocb, int fd) -+.\" { -+.\" memset(iocb, 0, sizeof(*iocb)); -+.\" iocb->aio_fildes = fd; -+.\" iocb->aio_lio_opcode = IO_CMD_FSYNC; -+.\" iocb->aio_reqprio = 0; -+.\" } - .TH io_prep_fsync 3 2002-09-12 "Linux 2.4" Linux AIO" - .SH NAME - io_prep_fsync \- Synchronize a file's complete in-core state with that on disk -diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3 -index 2c3b314..1ab28f5 100644 ---- a/man/io_prep_pread.3 -+++ b/man/io_prep_pread.3 -@@ -1,13 +1,13 @@ --./" static inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) --./" { --./" memset(iocb, 0, sizeof(*iocb)); --./" iocb->aio_fildes = fd; --./" iocb->aio_lio_opcode = IO_CMD_PREAD; --./" iocb->aio_reqprio = 0; --./" iocb->u.c.buf = buf; --./" iocb->u.c.nbytes = count; --./" iocb->u.c.offset = offset; --./" } -+.\" static inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) -+.\" { -+.\" memset(iocb, 0, sizeof(*iocb)); -+.\" iocb->aio_fildes = fd; -+.\" iocb->aio_lio_opcode = IO_CMD_PREAD; -+.\" iocb->aio_reqprio = 0; -+.\" iocb->u.c.buf = buf; -+.\" iocb->u.c.nbytes = count; -+.\" iocb->u.c.offset = offset; -+.\" } - .TH io_prep_pread 3 2002-09-12 "Linux 2.4" Linux AIO" - .SH NAME - io_prep_pread \- Set up asynchronous read -diff --git a/man/io_prep_pwrite.3 b/man/io_prep_pwrite.3 -index 669b8c2..f8d7fac 100644 ---- a/man/io_prep_pwrite.3 -+++ b/man/io_prep_pwrite.3 -@@ -1,13 +1,13 @@ --./" static inline void io_prep_pwrite(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) --./" { --./" memset(iocb, 0, sizeof(*iocb)); --./" iocb->aio_fildes = fd; --./" iocb->aio_lio_opcode = IO_CMD_PWRITE; --./" iocb->aio_reqprio = 0; --./" iocb->u.c.buf = buf; --./" iocb->u.c.nbytes = count; --./" iocb->u.c.offset = offset; --./" } -+.\" static inline void io_prep_pwrite(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) -+.\" { -+.\" memset(iocb, 0, sizeof(*iocb)); -+.\" iocb->aio_fildes = fd; -+.\" iocb->aio_lio_opcode = IO_CMD_PWRITE; -+.\" iocb->aio_reqprio = 0; -+.\" iocb->u.c.buf = buf; -+.\" iocb->u.c.nbytes = count; -+.\" iocb->u.c.offset = offset; -+.\" } - .TH io_prep_pwrite 3 2002-09-12 "Linux 2.4" Linux AIO" - .SH NAME - io_prep_pwrite \- Set up iocb for asynchronous writes -diff --git a/man/io_set_callback.3 b/man/io_set_callback.3 -index 3c7e43f..cc842f7 100644 ---- a/man/io_set_callback.3 -+++ b/man/io_set_callback.3 -@@ -1,4 +1,4 @@ --./"static inline void io_set_callback(struct iocb *iocb, io_callback_t cb) -+.\"static inline void io_set_callback(struct iocb *iocb, io_callback_t cb) - .TH io_set_callback 3 2002-09-12 "Linux 2.4" Linux AIO" - .SH NAME - io_set_callback \- Set up io completion callback function -diff --git a/man/io_submit.3 b/man/io_submit.3 -index 7281147..a810b3f 100644 ---- a/man/io_submit.3 -+++ b/man/io_submit.3 -@@ -1,15 +1,15 @@ --./"/* sys_io_submit: --./" * Queue the nr iocbs pointed to by iocbpp for processing. Returns --./" * the number of iocbs queued. May return -EINVAL if the aio_context --./" * specified by ctx_id is invalid, if nr is < 0, if the iocb at --./" * *iocbpp[0] is not properly initialized, if the operation specified --./" * is invalid for the file descriptor in the iocb. May fail with --./" * -EFAULT if any of the data structures point to invalid data. May --./" * fail with -EBADF if the file descriptor specified in the first --./" * iocb is invalid. May fail with -EAGAIN if insufficient resources --./" * are available to queue any iocbs. Will return 0 if nr is 0. Will --./" * fail with -ENOSYS if not implemented. --./" */ -+.\"/* sys_io_submit: -+.\" * Queue the nr iocbs pointed to by iocbpp for processing. Returns -+.\" * the number of iocbs queued. May return -EINVAL if the aio_context -+.\" * specified by ctx_id is invalid, if nr is < 0, if the iocb at -+.\" * *iocbpp[0] is not properly initialized, if the operation specified -+.\" * is invalid for the file descriptor in the iocb. May fail with -+.\" * -EFAULT if any of the data structures point to invalid data. May -+.\" * fail with -EBADF if the file descriptor specified in the first -+.\" * iocb is invalid. May fail with -EAGAIN if insufficient resources -+.\" * are available to queue any iocbs. Will return 0 if nr is 0. Will -+.\" * fail with -ENOSYS if not implemented. -+.\" */ - .TH io_submit 2 2002-09-02 "Linux 2.4" "Linux AIO" - .SH NAME - io_submit \- Submit io requests --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0003-harness-Make-RISC-V-use-SYS_eventfd2-instead-of-SYS_.patch libaio-0.3.112/debian/patches/0003-harness-Make-RISC-V-use-SYS_eventfd2-instead-of-SYS_.patch --- libaio-0.3.112/debian/patches/0003-harness-Make-RISC-V-use-SYS_eventfd2-instead-of-SYS_.patch 2019-02-26 02:34:09.000000000 +0000 +++ libaio-0.3.112/debian/patches/0003-harness-Make-RISC-V-use-SYS_eventfd2-instead-of-SYS_.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -From 42e252f5fd42f147559452a781b5bb851ff0f40a Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Tue, 26 Feb 2019 01:45:15 +0100 -Subject: [PATCH 3/7] harness: Make RISC-V use SYS_eventfd2 instead of - SYS_eventfd - -This is a recent architecture and as such does not provide legacy -support for SYS_eventfd. Declare that we need to use the new syscall. - -Signed-off-by: Guillem Jover ---- - harness/cases/16.t | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/harness/cases/16.t b/harness/cases/16.t -index 5a546ff..b36bbd2 100644 ---- a/harness/cases/16.t -+++ b/harness/cases/16.t -@@ -18,12 +18,12 @@ - #define SYS_eventfd 318 - #elif defined(__alpha__) - #define SYS_eventfd 478 --#elif defined(__aarch64__) --/* arm64 does not implement eventfd, only eventfd2 */ -+#elif defined(__aarch64__) || defined(__riscv) -+/* arm64 and riscv do not implement eventfd, only eventfd2 */ - #define USE_EVENTFD2 - #ifndef SYS_eventfd2 - #define SYS_eventfd2 19 --#endif /* __aarch64__ */ -+#endif /* __aarch64__ || __riscv */ - #else - #error define SYS_eventfd for your arch! - #endif --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0003-man-Refer-to-libaio.h-instead-of-libio.h.patch libaio-0.3.112/debian/patches/0003-man-Refer-to-libaio.h-instead-of-libio.h.patch --- libaio-0.3.112/debian/patches/0003-man-Refer-to-libaio.h-instead-of-libio.h.patch 2019-02-25 01:49:18.000000000 +0000 +++ libaio-0.3.112/debian/patches/0003-man-Refer-to-libaio.h-instead-of-libio.h.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -From 183d0f60be9e0bfcb987b03818868351364cd54d Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Sun, 13 Aug 2017 20:47:46 +0200 -Subject: [PATCH 03/15] man: Refer to libaio.h instead of libio.h - -Signed-off-by: Guillem Jover ---- - man/io.3 | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/man/io.3 b/man/io.3 -index 968b1f9..e4fe108 100644 ---- a/man/io.3 -+++ b/man/io.3 -@@ -6,7 +6,7 @@ io \- Asynchronous IO - .B #include - .sp - .br --.B #include -+.B #include - .sp - .fi - .SH DESCRIPTION -@@ -29,7 +29,7 @@ might be arbitrarily many operations running for one file. The - asynchronous I/O operations are controlled using a data structure named - .IR "struct iocb" - It is defined in --.IR "libio.h" -+.IR "libaio.h" - as follows. - - .nf --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0003-man-Use-the-correct-troff-macro-for-comments.patch libaio-0.3.112/debian/patches/0003-man-Use-the-correct-troff-macro-for-comments.patch --- libaio-0.3.112/debian/patches/0003-man-Use-the-correct-troff-macro-for-comments.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0003-man-Use-the-correct-troff-macro-for-comments.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,204 @@ +From 0cd5b9ea20e8bc315d43ba1e38ed113804e3c759 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:18:01 +0200 +Subject: [PATCH libaio 03/26] man: Use the correct troff macro for comments + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + man/io_fsync.3 | 12 ++++++------ + man/io_getevents.3 | 36 ++++++++++++++++++------------------ + man/io_prep_fsync.3 | 14 +++++++------- + man/io_prep_pread.3 | 20 ++++++++++---------- + man/io_prep_pwrite.3 | 20 ++++++++++---------- + man/io_set_callback.3 | 2 +- + man/io_submit.3 | 24 ++++++++++++------------ + 7 files changed, 64 insertions(+), 64 deletions(-) + +diff --git a/man/io_fsync.3 b/man/io_fsync.3 +index 859de1b..77a62ff 100644 +--- a/man/io_fsync.3 ++++ b/man/io_fsync.3 +@@ -1,9 +1,9 @@ +-./" static inline int io_fsync(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd) +-./" { +-./" io_prep_fsync(iocb, fd); +-./" io_set_callback(iocb, cb); +-./" return io_submit(ctx, 1, &iocb); +-./" } ++.\" static inline int io_fsync(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd) ++.\" { ++.\" io_prep_fsync(iocb, fd); ++.\" io_set_callback(iocb, cb); ++.\" return io_submit(ctx, 1, &iocb); ++.\" } + .TH io_fsync 3 2002-09-12 "Linux 2.4" Linux AIO" + .SH NAME + io_fsync \- Synchronize a file's complete in-core state with that on disk +diff --git a/man/io_getevents.3 b/man/io_getevents.3 +index a4f8b57..1e643ac 100644 +--- a/man/io_getevents.3 ++++ b/man/io_getevents.3 +@@ -1,21 +1,21 @@ +-./"/* io_getevents: +-./" * Attempts to read at least min_nr events and up to nr events from +-./" * the completion queue for the aio_context specified by ctx_id. May +-./" * fail with -EINVAL if ctx_id is invalid, if min_nr is out of range, +-./" * if nr is out of range, if when is out of range. May fail with +-./" * -EFAULT if any of the memory specified to is invalid. May return +-./" * 0 or < min_nr if no events are available and the timeout specified +-./" * by when has elapsed, where when == NULL specifies an infinite +-./" * timeout. Note that the timeout pointed to by when is relative and +-./" * will be updated if not NULL and the operation blocks. Will fail +-./" * with -ENOSYS if not implemented. +-./" */ +-./"asmlinkage long sys_io_getevents(io_context_t ctx_id, +-./" long min_nr, +-./" long nr, +-./" struct io_event *events, +-./" struct timespec *timeout) +-./" ++.\"/* io_getevents: ++.\" * Attempts to read at least min_nr events and up to nr events from ++.\" * the completion queue for the aio_context specified by ctx_id. May ++.\" * fail with -EINVAL if ctx_id is invalid, if min_nr is out of range, ++.\" * if nr is out of range, if when is out of range. May fail with ++.\" * -EFAULT if any of the memory specified to is invalid. May return ++.\" * 0 or < min_nr if no events are available and the timeout specified ++.\" * by when has elapsed, where when == NULL specifies an infinite ++.\" * timeout. Note that the timeout pointed to by when is relative and ++.\" * will be updated if not NULL and the operation blocks. Will fail ++.\" * with -ENOSYS if not implemented. ++.\" */ ++.\"asmlinkage long sys_io_getevents(io_context_t ctx_id, ++.\" long min_nr, ++.\" long nr, ++.\" struct io_event *events, ++.\" struct timespec *timeout) ++.\" + .TH io_getevents 2 2002-09-03 "Linux 2.4" "Linux AIO" + .SH NAME + io_getevents, aio_pgetevents \- Read resulting events from io requests +diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3 +index 1173e2a..2daddee 100644 +--- a/man/io_prep_fsync.3 ++++ b/man/io_prep_fsync.3 +@@ -1,10 +1,10 @@ +-./" static inline void io_prep_fsync(struct iocb *iocb, int fd) +-./" { +-./" memset(iocb, 0, sizeof(*iocb)); +-./" iocb->aio_fildes = fd; +-./" iocb->aio_lio_opcode = IO_CMD_FSYNC; +-./" iocb->aio_reqprio = 0; +-./" } ++.\" static inline void io_prep_fsync(struct iocb *iocb, int fd) ++.\" { ++.\" memset(iocb, 0, sizeof(*iocb)); ++.\" iocb->aio_fildes = fd; ++.\" iocb->aio_lio_opcode = IO_CMD_FSYNC; ++.\" iocb->aio_reqprio = 0; ++.\" } + .TH io_prep_fsync 3 2002-09-12 "Linux 2.4" Linux AIO" + .SH NAME + io_prep_fsync \- Synchronize a file's complete in-core state with that on disk +diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3 +index 2c3b314..1ab28f5 100644 +--- a/man/io_prep_pread.3 ++++ b/man/io_prep_pread.3 +@@ -1,13 +1,13 @@ +-./" static inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) +-./" { +-./" memset(iocb, 0, sizeof(*iocb)); +-./" iocb->aio_fildes = fd; +-./" iocb->aio_lio_opcode = IO_CMD_PREAD; +-./" iocb->aio_reqprio = 0; +-./" iocb->u.c.buf = buf; +-./" iocb->u.c.nbytes = count; +-./" iocb->u.c.offset = offset; +-./" } ++.\" static inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) ++.\" { ++.\" memset(iocb, 0, sizeof(*iocb)); ++.\" iocb->aio_fildes = fd; ++.\" iocb->aio_lio_opcode = IO_CMD_PREAD; ++.\" iocb->aio_reqprio = 0; ++.\" iocb->u.c.buf = buf; ++.\" iocb->u.c.nbytes = count; ++.\" iocb->u.c.offset = offset; ++.\" } + .TH io_prep_pread 3 2002-09-12 "Linux 2.4" Linux AIO" + .SH NAME + io_prep_pread \- Set up asynchronous read +diff --git a/man/io_prep_pwrite.3 b/man/io_prep_pwrite.3 +index 669b8c2..f8d7fac 100644 +--- a/man/io_prep_pwrite.3 ++++ b/man/io_prep_pwrite.3 +@@ -1,13 +1,13 @@ +-./" static inline void io_prep_pwrite(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) +-./" { +-./" memset(iocb, 0, sizeof(*iocb)); +-./" iocb->aio_fildes = fd; +-./" iocb->aio_lio_opcode = IO_CMD_PWRITE; +-./" iocb->aio_reqprio = 0; +-./" iocb->u.c.buf = buf; +-./" iocb->u.c.nbytes = count; +-./" iocb->u.c.offset = offset; +-./" } ++.\" static inline void io_prep_pwrite(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) ++.\" { ++.\" memset(iocb, 0, sizeof(*iocb)); ++.\" iocb->aio_fildes = fd; ++.\" iocb->aio_lio_opcode = IO_CMD_PWRITE; ++.\" iocb->aio_reqprio = 0; ++.\" iocb->u.c.buf = buf; ++.\" iocb->u.c.nbytes = count; ++.\" iocb->u.c.offset = offset; ++.\" } + .TH io_prep_pwrite 3 2002-09-12 "Linux 2.4" Linux AIO" + .SH NAME + io_prep_pwrite \- Set up iocb for asynchronous writes +diff --git a/man/io_set_callback.3 b/man/io_set_callback.3 +index 3c7e43f..cc842f7 100644 +--- a/man/io_set_callback.3 ++++ b/man/io_set_callback.3 +@@ -1,4 +1,4 @@ +-./"static inline void io_set_callback(struct iocb *iocb, io_callback_t cb) ++.\"static inline void io_set_callback(struct iocb *iocb, io_callback_t cb) + .TH io_set_callback 3 2002-09-12 "Linux 2.4" Linux AIO" + .SH NAME + io_set_callback \- Set up io completion callback function +diff --git a/man/io_submit.3 b/man/io_submit.3 +index 7281147..a810b3f 100644 +--- a/man/io_submit.3 ++++ b/man/io_submit.3 +@@ -1,15 +1,15 @@ +-./"/* sys_io_submit: +-./" * Queue the nr iocbs pointed to by iocbpp for processing. Returns +-./" * the number of iocbs queued. May return -EINVAL if the aio_context +-./" * specified by ctx_id is invalid, if nr is < 0, if the iocb at +-./" * *iocbpp[0] is not properly initialized, if the operation specified +-./" * is invalid for the file descriptor in the iocb. May fail with +-./" * -EFAULT if any of the data structures point to invalid data. May +-./" * fail with -EBADF if the file descriptor specified in the first +-./" * iocb is invalid. May fail with -EAGAIN if insufficient resources +-./" * are available to queue any iocbs. Will return 0 if nr is 0. Will +-./" * fail with -ENOSYS if not implemented. +-./" */ ++.\"/* sys_io_submit: ++.\" * Queue the nr iocbs pointed to by iocbpp for processing. Returns ++.\" * the number of iocbs queued. May return -EINVAL if the aio_context ++.\" * specified by ctx_id is invalid, if nr is < 0, if the iocb at ++.\" * *iocbpp[0] is not properly initialized, if the operation specified ++.\" * is invalid for the file descriptor in the iocb. May fail with ++.\" * -EFAULT if any of the data structures point to invalid data. May ++.\" * fail with -EBADF if the file descriptor specified in the first ++.\" * iocb is invalid. May fail with -EAGAIN if insufficient resources ++.\" * are available to queue any iocbs. Will return 0 if nr is 0. Will ++.\" * fail with -ENOSYS if not implemented. ++.\" */ + .TH io_submit 2 2002-09-02 "Linux 2.4" "Linux AIO" + .SH NAME + io_submit \- Submit io requests +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0004-harness-Add-fallback-code-for-filesystems-not-suppor.patch libaio-0.3.112/debian/patches/0004-harness-Add-fallback-code-for-filesystems-not-suppor.patch --- libaio-0.3.112/debian/patches/0004-harness-Add-fallback-code-for-filesystems-not-suppor.patch 2019-02-26 04:21:33.000000000 +0000 +++ libaio-0.3.112/debian/patches/0004-harness-Add-fallback-code-for-filesystems-not-suppor.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ -From 67bec1779c8232f37f68b4ad17865427003b3f35 Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Tue, 26 Feb 2019 02:55:40 +0100 -Subject: [PATCH 4/7] harness: Add fallback code for filesystems not supporting - O_DIRECT - -When running the harness on a filesystem such as a tmpfs, which do not -support O_DIRECT, fallback to calls without the flag. - -Signed-off-by: Guillem Jover ---- - harness/cases/17.t | 2 ++ - harness/cases/18.t | 2 ++ - harness/cases/19.t | 4 ++++ - harness/cases/21.t | 2 +- - 4 files changed, 9 insertions(+), 1 deletion(-) - -diff --git a/harness/cases/17.t b/harness/cases/17.t -index 38ada4d..10c6b9c 100644 ---- a/harness/cases/17.t -+++ b/harness/cases/17.t -@@ -138,6 +138,8 @@ void run_test(int max_ios, int getevents_type) - - unlink(filename); - fd = open(filename, O_CREAT | O_RDWR | O_DIRECT, 0644); -+ if (fd < 0 && errno == EINVAL) -+ fd = open(filename, O_CREAT | O_RDWR, 0644); - assert(fd >= 0); - - ret = ftruncate(fd, max_ios * io_size); -diff --git a/harness/cases/18.t b/harness/cases/18.t -index daa1d26..d58f99b 100644 ---- a/harness/cases/18.t -+++ b/harness/cases/18.t -@@ -53,6 +53,8 @@ aio_worker(void *ptr) - assert(buffer != NULL); - - fd = open(FILENAME, O_DIRECT|O_RDONLY); -+ if (fd < 0 && errno == EINVAL) -+ fd = open(FILENAME, O_RDONLY); - assert(fd >= 0); - - for (i = 0; i < 1000; i++) { -diff --git a/harness/cases/19.t b/harness/cases/19.t -index 5c3e0d6..aad9bdb 100644 ---- a/harness/cases/19.t -+++ b/harness/cases/19.t -@@ -43,6 +43,10 @@ open_temp_file(void) - - strncpy(template, TEMPLATE, sizeof(template)); - fd = mkostemp(template, O_DIRECT); -+ if (fd < 0 && errno == EINVAL) { -+ strncpy(template, TEMPLATE, sizeof(template)); -+ fd = mkstemp(template); -+ } - if (fd < 0) { - perror("mkstemp"); - exit(1); -diff --git a/harness/cases/21.t b/harness/cases/21.t -index fe33a9d..c1370fd 100644 ---- a/harness/cases/21.t -+++ b/harness/cases/21.t -@@ -92,7 +92,7 @@ test_main() - */ - flags = fcntl(fd, F_GETFL); - ret = fcntl(fd, F_SETFL, flags | O_DIRECT); -- if (ret != 0) { -+ if (ret != 0 && errno != EINVAL) { - perror("fcntl"); - return 1; - } --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0004-man-End-sentences-with-a-period.patch libaio-0.3.112/debian/patches/0004-man-End-sentences-with-a-period.patch --- libaio-0.3.112/debian/patches/0004-man-End-sentences-with-a-period.patch 2019-02-25 01:49:18.000000000 +0000 +++ libaio-0.3.112/debian/patches/0004-man-End-sentences-with-a-period.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,133 +0,0 @@ -From 0abb26053c5d814510e97e08ced56742f0044eeb Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Sun, 13 Aug 2017 20:36:23 +0200 -Subject: [PATCH 04/15] man: End sentences with a period - -Signed-off-by: Guillem Jover ---- - man/io_prep_fsync.3 | 4 ++-- - man/io_prep_pread.3 | 4 ++-- - man/io_prep_pwrite.3 | 4 ++-- - man/io_queue_init.3 | 2 +- - man/io_queue_release.3 | 2 +- - man/io_queue_run.3 | 2 +- - man/io_queue_wait.3 | 2 +- - man/io_set_callback.3 | 2 +- - 8 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3 -index 2daddee..3a5f952 100644 ---- a/man/io_prep_fsync.3 -+++ b/man/io_prep_fsync.3 -@@ -70,9 +70,9 @@ must be called. - Simultaneous asynchronous operations using the same iocb produce - undefined results. - .SH "RETURN VALUES" --None -+None. - .SH ERRORS --None -+None. - .SH "SEE ALSO" - .BR io (3), - .BR io_cancel (3), -diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3 -index 1ab28f5..a4df182 100644 ---- a/man/io_prep_pread.3 -+++ b/man/io_prep_pread.3 -@@ -60,9 +60,9 @@ must be called. - Simultaneous asynchronous operations using the same iocb produce - undefined results. - .SH "RETURN VALUES" --None -+None. - .SH ERRORS --None -+None. - .SH "SEE ALSO" - .BR io (3), - .BR io_cancel (3), -diff --git a/man/io_prep_pwrite.3 b/man/io_prep_pwrite.3 -index f8d7fac..73c62c7 100644 ---- a/man/io_prep_pwrite.3 -+++ b/man/io_prep_pwrite.3 -@@ -58,9 +58,9 @@ must be called. - Simultaneous asynchronous operations using the same iocb produce - undefined results. - .SH "RETURN VALUES" --None -+None. - .SH ERRORS --None -+None. - .SH "SEE ALSO" - .BR io (3), - .BR io_cancel (3), -diff --git a/man/io_queue_init.3 b/man/io_queue_init.3 -index 7531f51..666dfae 100644 ---- a/man/io_queue_init.3 -+++ b/man/io_queue_init.3 -@@ -42,7 +42,7 @@ is <= 0 or - is an invalid memory locattion. - .TP - .B ENOSYS --Not implemented -+Not implemented. - .TP - .B EAGAIN - .IR "maxevents > max_aio_reqs" -diff --git a/man/io_queue_release.3 b/man/io_queue_release.3 -index 9df39a0..f927562 100644 ---- a/man/io_queue_release.3 -+++ b/man/io_queue_release.3 -@@ -30,7 +30,7 @@ refers to an unitialized aio context, the iocb pointed to by - contains an improperly initialized iocb, - .TP - .B ENOSYS --Not implemented -+Not implemented. - .SH "SEE ALSO" - .BR io (3), - .BR io_cancel (3), -diff --git a/man/io_queue_run.3 b/man/io_queue_run.3 -index 45762f5..35f385b 100644 ---- a/man/io_queue_run.3 -+++ b/man/io_queue_run.3 -@@ -33,7 +33,7 @@ refers to an unitialized aio context, the iocb pointed to by - contains an improperly initialized iocb, - .TP - .B ENOSYS --Not implemented -+Not implemented. - .SH "SEE ALSO" - .BR io (3), - .BR io_cancel (3), -diff --git a/man/io_queue_wait.3 b/man/io_queue_wait.3 -index 2c7fc2c..eb6db83 100644 ---- a/man/io_queue_wait.3 -+++ b/man/io_queue_wait.3 -@@ -39,7 +39,7 @@ refers to an unitialized aio context, the iocb pointed to by - contains an improperly initialized iocb, - .TP - .B ENOSYS --Not implemented -+Not implemented. - .SH "SEE ALSO" - .BR io (3), - .BR io_cancel (3), -diff --git a/man/io_set_callback.3 b/man/io_set_callback.3 -index cc842f7..71efd2f 100644 ---- a/man/io_set_callback.3 -+++ b/man/io_set_callback.3 -@@ -25,7 +25,7 @@ typedef void (*io_callback_t)(io_context_t ctx, struct iocb *iocb, long res, lon - .fi - .SH DESCRIPTION - The callback is not done if the caller uses raw events from --io_getevents, only with the library helpers -+io_getevents, only with the library helpers. - .SH "RETURN VALUES" - .SH ERRORS - .SH "SEE ALSO" --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0004-man-Refer-to-libaio.h-instead-of-libio.h.patch libaio-0.3.112/debian/patches/0004-man-Refer-to-libaio.h-instead-of-libio.h.patch --- libaio-0.3.112/debian/patches/0004-man-Refer-to-libaio.h-instead-of-libio.h.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0004-man-Refer-to-libaio.h-instead-of-libio.h.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,36 @@ +From e9dce27ad722dc2f17f913e56432107bc3c1229f Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:18:02 +0200 +Subject: [PATCH libaio 04/26] man: Refer to libaio.h instead of libio.h + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + man/io.3 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/man/io.3 b/man/io.3 +index 968b1f9..e4fe108 100644 +--- a/man/io.3 ++++ b/man/io.3 +@@ -6,7 +6,7 @@ io \- Asynchronous IO + .B #include + .sp + .br +-.B #include ++.B #include + .sp + .fi + .SH DESCRIPTION +@@ -29,7 +29,7 @@ might be arbitrarily many operations running for one file. The + asynchronous I/O operations are controlled using a data structure named + .IR "struct iocb" + It is defined in +-.IR "libio.h" ++.IR "libaio.h" + as follows. + + .nf +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0005-harness-Handle-ENOTSUP-from-io_submit-with-RWF_NOWAI.patch libaio-0.3.112/debian/patches/0005-harness-Handle-ENOTSUP-from-io_submit-with-RWF_NOWAI.patch --- libaio-0.3.112/debian/patches/0005-harness-Handle-ENOTSUP-from-io_submit-with-RWF_NOWAI.patch 2019-02-26 02:34:09.000000000 +0000 +++ libaio-0.3.112/debian/patches/0005-harness-Handle-ENOTSUP-from-io_submit-with-RWF_NOWAI.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -From 649fc347f191bc228fe3509b2a2d0651f09ebf2f Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Tue, 26 Feb 2019 02:57:05 +0100 -Subject: [PATCH 5/7] harness: Handle -ENOTSUP from io_submit() with RWF_NOWAIT - -On filesystems such as tmpfs the syscall might return -ENOTSUP instead -of EINVAL when it does not support the RWF_NOWAIT flag. - -Signed-off-by: Guillem Jover ---- - harness/cases/21.t | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/harness/cases/21.t b/harness/cases/21.t -index c1370fd..2b39eff 100644 ---- a/harness/cases/21.t -+++ b/harness/cases/21.t -@@ -105,10 +105,11 @@ test_main() - ret = io_submit(ctx, 1, &iocbp); - - /* -- * io_submit will return -EINVAL if RWF_NOWAIT is not supported. -+ * io_submit will return -EINVAL or -ENOTSUP if RWF_NOWAIT is not -+ * supported. - */ - if (ret != 1) { -- if (ret == -EINVAL) { -+ if (ret == -EINVAL || ret == -ENOTSUP) { - fprintf(stderr, "RWF_NOWAIT not supported by kernel.\n"); - /* just return success */ - return 0; --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0005-man-End-sentences-with-a-period.patch libaio-0.3.112/debian/patches/0005-man-End-sentences-with-a-period.patch --- libaio-0.3.112/debian/patches/0005-man-End-sentences-with-a-period.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0005-man-End-sentences-with-a-period.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,134 @@ +From d868db4f2c993ebb2895ca77c32b5a5d000355d7 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:18:03 +0200 +Subject: [PATCH libaio 05/26] man: End sentences with a period + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + man/io_prep_fsync.3 | 4 ++-- + man/io_prep_pread.3 | 4 ++-- + man/io_prep_pwrite.3 | 4 ++-- + man/io_queue_init.3 | 2 +- + man/io_queue_release.3 | 2 +- + man/io_queue_run.3 | 2 +- + man/io_queue_wait.3 | 2 +- + man/io_set_callback.3 | 2 +- + 8 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3 +index 2daddee..3a5f952 100644 +--- a/man/io_prep_fsync.3 ++++ b/man/io_prep_fsync.3 +@@ -70,9 +70,9 @@ must be called. + Simultaneous asynchronous operations using the same iocb produce + undefined results. + .SH "RETURN VALUES" +-None ++None. + .SH ERRORS +-None ++None. + .SH "SEE ALSO" + .BR io (3), + .BR io_cancel (3), +diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3 +index 1ab28f5..a4df182 100644 +--- a/man/io_prep_pread.3 ++++ b/man/io_prep_pread.3 +@@ -60,9 +60,9 @@ must be called. + Simultaneous asynchronous operations using the same iocb produce + undefined results. + .SH "RETURN VALUES" +-None ++None. + .SH ERRORS +-None ++None. + .SH "SEE ALSO" + .BR io (3), + .BR io_cancel (3), +diff --git a/man/io_prep_pwrite.3 b/man/io_prep_pwrite.3 +index f8d7fac..73c62c7 100644 +--- a/man/io_prep_pwrite.3 ++++ b/man/io_prep_pwrite.3 +@@ -58,9 +58,9 @@ must be called. + Simultaneous asynchronous operations using the same iocb produce + undefined results. + .SH "RETURN VALUES" +-None ++None. + .SH ERRORS +-None ++None. + .SH "SEE ALSO" + .BR io (3), + .BR io_cancel (3), +diff --git a/man/io_queue_init.3 b/man/io_queue_init.3 +index 7531f51..666dfae 100644 +--- a/man/io_queue_init.3 ++++ b/man/io_queue_init.3 +@@ -42,7 +42,7 @@ is <= 0 or + is an invalid memory locattion. + .TP + .B ENOSYS +-Not implemented ++Not implemented. + .TP + .B EAGAIN + .IR "maxevents > max_aio_reqs" +diff --git a/man/io_queue_release.3 b/man/io_queue_release.3 +index 9df39a0..f927562 100644 +--- a/man/io_queue_release.3 ++++ b/man/io_queue_release.3 +@@ -30,7 +30,7 @@ refers to an unitialized aio context, the iocb pointed to by + contains an improperly initialized iocb, + .TP + .B ENOSYS +-Not implemented ++Not implemented. + .SH "SEE ALSO" + .BR io (3), + .BR io_cancel (3), +diff --git a/man/io_queue_run.3 b/man/io_queue_run.3 +index 45762f5..35f385b 100644 +--- a/man/io_queue_run.3 ++++ b/man/io_queue_run.3 +@@ -33,7 +33,7 @@ refers to an unitialized aio context, the iocb pointed to by + contains an improperly initialized iocb, + .TP + .B ENOSYS +-Not implemented ++Not implemented. + .SH "SEE ALSO" + .BR io (3), + .BR io_cancel (3), +diff --git a/man/io_queue_wait.3 b/man/io_queue_wait.3 +index 2c7fc2c..eb6db83 100644 +--- a/man/io_queue_wait.3 ++++ b/man/io_queue_wait.3 +@@ -39,7 +39,7 @@ refers to an unitialized aio context, the iocb pointed to by + contains an improperly initialized iocb, + .TP + .B ENOSYS +-Not implemented ++Not implemented. + .SH "SEE ALSO" + .BR io (3), + .BR io_cancel (3), +diff --git a/man/io_set_callback.3 b/man/io_set_callback.3 +index cc842f7..71efd2f 100644 +--- a/man/io_set_callback.3 ++++ b/man/io_set_callback.3 +@@ -25,7 +25,7 @@ typedef void (*io_callback_t)(io_context_t ctx, struct iocb *iocb, long res, lon + .fi + .SH DESCRIPTION + The callback is not done if the caller uses raw events from +-io_getevents, only with the library helpers ++io_getevents, only with the library helpers. + .SH "RETURN VALUES" + .SH ERRORS + .SH "SEE ALSO" +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0005-man-Fix-casing.patch libaio-0.3.112/debian/patches/0005-man-Fix-casing.patch --- libaio-0.3.112/debian/patches/0005-man-Fix-casing.patch 2019-02-25 01:49:18.000000000 +0000 +++ libaio-0.3.112/debian/patches/0005-man-Fix-casing.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -From bb54864ec53ee1f2c1f2533b8988ee69ffcd6f90 Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Sun, 13 Aug 2017 20:36:23 +0200 -Subject: [PATCH 05/15] man: Fix casing - -Signed-off-by: Guillem Jover ---- - man/io_cancel.3 | 4 ++-- - man/io_getevents.3 | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/man/io_cancel.3 b/man/io_cancel.3 -index 3cf1bc6..9ac1b40 100644 ---- a/man/io_cancel.3 -+++ b/man/io_cancel.3 -@@ -33,7 +33,7 @@ have to be overwritten soon. As an example, assume an application, which - writes data in files in a situation where new incoming data would have - to be written in a file which will be updated by an enqueued request. - .SH "RETURN VALUES" --0 is returned on success , otherwise returns Errno. -+0 is returned on success , otherwise returns errno. - .SH ERRORS - .TP - .B EFAULT -@@ -48,7 +48,7 @@ If the iocb specified was not - cancelled. - .TP - .B ENOSYS --if not implemented. -+If not implemented. - .SH "SEE ALSO" - .BR io (3), - .BR io_fsync (3), -diff --git a/man/io_getevents.3 b/man/io_getevents.3 -index 1e643ac..c8f2676 100644 ---- a/man/io_getevents.3 -+++ b/man/io_getevents.3 -@@ -112,11 +112,11 @@ behaves the same as - .SH ERRORS - .TP - .B EINVAL --if ctx_id is invalid, if min_nr is out of range, -+If ctx_id is invalid, if min_nr is out of range, - if nr is out of range, if when is out of range. - .TP - .B EFAULT --if any of the memory specified to is invalid. -+If any of the memory specified to is invalid. - .SH "SEE ALSO" - .BR io (3), - .BR io_cancel (3), --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0006-harness-The-WRITE-call-does-not-change-across-differ.patch libaio-0.3.112/debian/patches/0006-harness-The-WRITE-call-does-not-change-across-differ.patch --- libaio-0.3.112/debian/patches/0006-harness-The-WRITE-call-does-not-change-across-differ.patch 2019-08-02 02:32:42.000000000 +0000 +++ libaio-0.3.112/debian/patches/0006-harness-The-WRITE-call-does-not-change-across-differ.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -From: Jeff Moyer -Date: Mon, 29 Jul 2019 10:30:05 -0400 -Subject: [PATCH 6/7] harness: Fix the arch-dependent condition for the READ - call - -diff --git a/harness/cases/5.t b/harness/cases/5.t -index 2b4b4bb..7d67562 100644 ---- a/harness/cases/5.t -+++ b/harness/cases/5.t -@@ -40,14 +40,14 @@ int test_main(void) - buf = mmap(0, page_size, PROT_WRITE, MAP_SHARED, rwfd, 0); - assert(buf != (char *)-1); - -- status |= attempt_rw(rwfd, buf, SIZE, 0, READ, SIZE); -- - /* Whether PROT_WRITE is readable is arch-dependent. So compare - * against read result. */ - res = read(rwfd, buf, SIZE); - if (res < 0) - res = -errno; -- status |= attempt_rw(rwfd, buf, SIZE, 0, WRITE, res); -+ status |= attempt_rw(rwfd, buf, SIZE, 0, READ, res); -+ -+ status |= attempt_rw(rwfd, buf, SIZE, 0, WRITE, SIZE); - - return status; - } - diff -Nru libaio-0.3.112/debian/patches/0006-man-Fix-casing.patch libaio-0.3.112/debian/patches/0006-man-Fix-casing.patch --- libaio-0.3.112/debian/patches/0006-man-Fix-casing.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0006-man-Fix-casing.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,55 @@ +From 19a7217fe0a4dafd5f171b99bc27b7d8a29df9a0 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:18:04 +0200 +Subject: [PATCH libaio 06/26] man: Fix casing + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + man/io_cancel.3 | 4 ++-- + man/io_getevents.3 | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/man/io_cancel.3 b/man/io_cancel.3 +index 3cf1bc6..9ac1b40 100644 +--- a/man/io_cancel.3 ++++ b/man/io_cancel.3 +@@ -33,7 +33,7 @@ have to be overwritten soon. As an example, assume an application, which + writes data in files in a situation where new incoming data would have + to be written in a file which will be updated by an enqueued request. + .SH "RETURN VALUES" +-0 is returned on success , otherwise returns Errno. ++0 is returned on success , otherwise returns errno. + .SH ERRORS + .TP + .B EFAULT +@@ -48,7 +48,7 @@ If the iocb specified was not + cancelled. + .TP + .B ENOSYS +-if not implemented. ++If not implemented. + .SH "SEE ALSO" + .BR io (3), + .BR io_fsync (3), +diff --git a/man/io_getevents.3 b/man/io_getevents.3 +index 1e643ac..c8f2676 100644 +--- a/man/io_getevents.3 ++++ b/man/io_getevents.3 +@@ -112,11 +112,11 @@ behaves the same as + .SH ERRORS + .TP + .B EINVAL +-if ctx_id is invalid, if min_nr is out of range, ++If ctx_id is invalid, if min_nr is out of range, + if nr is out of range, if when is out of range. + .TP + .B EFAULT +-if any of the memory specified to is invalid. ++If any of the memory specified to is invalid. + .SH "SEE ALSO" + .BR io (3), + .BR io_cancel (3), +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0006-man-Fix-period-formatting.patch libaio-0.3.112/debian/patches/0006-man-Fix-period-formatting.patch --- libaio-0.3.112/debian/patches/0006-man-Fix-period-formatting.patch 2019-02-25 01:49:18.000000000 +0000 +++ libaio-0.3.112/debian/patches/0006-man-Fix-period-formatting.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,211 +0,0 @@ -From 9e6d0631a0a1094bc4082550664490230f0257e0 Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Sun, 13 Aug 2017 20:36:23 +0200 -Subject: [PATCH 06/15] man: Fix period formatting - -Signed-off-by: Guillem Jover ---- - man/io.3 | 13 +++++-------- - man/io_fsync.3 | 2 +- - man/io_getevents.3 | 3 +-- - man/io_prep_fsync.3 | 2 +- - man/io_prep_pread.3 | 5 ++--- - man/io_prep_pwrite.3 | 5 ++--- - man/io_queue_release.3 | 2 +- - man/io_queue_run.3 | 2 +- - man/io_queue_wait.3 | 2 +- - man/io_submit.3 | 8 ++++---- - 10 files changed, 19 insertions(+), 25 deletions(-) - -diff --git a/man/io.3 b/man/io.3 -index e4fe108..7b8ab5e 100644 ---- a/man/io.3 -+++ b/man/io.3 -@@ -17,8 +17,8 @@ then immediately resume normal work while the I/O operations are - executed in parallel. - - These functions are part of the library with realtime functions named --.IR "libaio" --. They are not actually part of the -+.IR libaio . -+They are not actually part of the - .IR "libc" - binary. - The implementation of these functions can be done using support in the -@@ -98,8 +98,7 @@ where the read data is stored. - .TP - .IR "long u.c.nbytes" - This element specifies the length of the buffer pointed to by --.IR "io_buf" --. -+.IR io_buf . - .TP - .IR "int aio_reqprio" - Is not currently used. -@@ -111,8 +110,7 @@ and store the next - .IR "u.c.nbytes" - bytes in the - buffer pointed to by --.IR "buf" --. -+.IR buf . - .TP - .B "IO_CMD_PWRITE" - Start a write operation. Write -@@ -120,8 +118,7 @@ Start a write operation. Write - bytes starting at - .IR "buf" - into the file starting at position --.IR "u.c.offset" --. -+.IR u.c.offset . - .TP - .B "IO_CMD_NOP" - Do nothing for this control block. This value is useful sometimes when -diff --git a/man/io_fsync.3 b/man/io_fsync.3 -index 77a62ff..03c81bc 100644 ---- a/man/io_fsync.3 -+++ b/man/io_fsync.3 -@@ -39,7 +39,7 @@ resources (mainly computation time). - Calling this function forces all I/O operations operating queued at the - time of the function call operating on the file descriptor - .IR "iocb->io_fildes" --into the synchronized I/O completion state . The -+into the synchronized I/O completion state. The - .IR "io_fsync" - function returns - immediately but the notification through the method described in -diff --git a/man/io_getevents.3 b/man/io_getevents.3 -index c8f2676..24c07c3 100644 ---- a/man/io_getevents.3 -+++ b/man/io_getevents.3 -@@ -107,8 +107,7 @@ argument is specified as NULL, then no signal mask manipulation is - performed (and thus - .BR io_pgetevents () - behaves the same as --.BR io_getevents() --) . -+.BR io_getevents() ). - .SH ERRORS - .TP - .B EINVAL -diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3 -index 3a5f952..cf4ecff 100644 ---- a/man/io_prep_fsync.3 -+++ b/man/io_prep_fsync.3 -@@ -62,7 +62,7 @@ forced to the relevant completion state. The completion of - subsequent I/O on the file descriptor is not guaranteed to be - completed in a synchronized fashion. - .PP --This function returns immediately . To schedule the operation, the -+This function returns immediately. To schedule the operation, the - function - .IR io_submit - must be called. -diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3 -index a4df182..6d66c0f 100644 ---- a/man/io_prep_pread.3 -+++ b/man/io_prep_pread.3 -@@ -44,15 +44,14 @@ bytes of the file for which - is a descriptor are written to the buffer - starting at - .TP --.IR "iocb->u.c.buf = buf" --. -+.IR "iocb->u.c.buf = buf" . - .br - Reading starts at the absolute position - .TP - .IR "ioc->u.c.offset = offset" - in the file. - .PP --This function returns immediately . To schedule the operation, the -+This function returns immediately. To schedule the operation, the - function - .IR io_submit - must be called. -diff --git a/man/io_prep_pwrite.3 b/man/io_prep_pwrite.3 -index 73c62c7..98b3a65 100644 ---- a/man/io_prep_pwrite.3 -+++ b/man/io_prep_pwrite.3 -@@ -42,15 +42,14 @@ bytes of the file for which - is a descriptor are written from the buffer - starting at - .TP --.IR "iocb->u.c.buf = buf" --. -+.IR "iocb->u.c.buf = buf" . - .br - Writing starts at the absolute position - .TP - .IR "ioc->u.c.offset = offset" - in the file. - .PP --This function returns immediately . To schedule the operation, the -+This function returns immediately. To schedule the operation, the - function - .IR io_submit - must be called. -diff --git a/man/io_queue_release.3 b/man/io_queue_release.3 -index f927562..db91bad 100644 ---- a/man/io_queue_release.3 -+++ b/man/io_queue_release.3 -@@ -12,7 +12,7 @@ io_queue_release \- Release the context associated with the userspace handle - .sp - .SH DESCRIPTION - .B io_queue_release --destroys the context associated with the userspace handle. May cancel any outstanding -+destroys the context associated with the userspace handle. May cancel any outstanding - AIOs and block on completion. - - .B cts. -diff --git a/man/io_queue_run.3 b/man/io_queue_run.3 -index 35f385b..018257f 100644 ---- a/man/io_queue_run.3 -+++ b/man/io_queue_run.3 -@@ -30,7 +30,7 @@ referenced data outside of the program's accessible address space. - .I ctx - refers to an unitialized aio context, the iocb pointed to by - .I iocbs --contains an improperly initialized iocb, -+contains an improperly initialized iocb. - .TP - .B ENOSYS - Not implemented. -diff --git a/man/io_queue_wait.3 b/man/io_queue_wait.3 -index eb6db83..e3598d9 100644 ---- a/man/io_queue_wait.3 -+++ b/man/io_queue_wait.3 -@@ -36,7 +36,7 @@ referenced data outside of the program's accessible address space. - .I ctx - refers to an unitialized aio context, the iocb pointed to by - .I iocbs --contains an improperly initialized iocb, -+contains an improperly initialized iocb. - .TP - .B ENOSYS - Not implemented. -diff --git a/man/io_submit.3 b/man/io_submit.3 -index a810b3f..76e68d1 100644 ---- a/man/io_submit.3 -+++ b/man/io_submit.3 -@@ -49,12 +49,12 @@ gets the - .IR "nr" - requests from the array pointed to - by --.IR "iocbs" --. The operation to be performed is determined by the -+.IR "iocbs" . -+The operation to be performed is determined by the - .IR "aio_lio_opcode" - member in each element of --.IR "iocbs" --. If this -+.IR "iocbs" . -+If this - field is - .B "IO_CMD_PREAD" - a read operation is enqueued, similar to a call --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0007-harness-Make-the-test-exit-with-a-code-matching-the-.patch libaio-0.3.112/debian/patches/0007-harness-Make-the-test-exit-with-a-code-matching-the-.patch --- libaio-0.3.112/debian/patches/0007-harness-Make-the-test-exit-with-a-code-matching-the-.patch 2019-02-26 04:24:18.000000000 +0000 +++ libaio-0.3.112/debian/patches/0007-harness-Make-the-test-exit-with-a-code-matching-the-.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -From 6649e73243e8167821d6aefd5f83343b85c2980b Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Tue, 26 Feb 2019 03:07:28 +0100 -Subject: [PATCH 7/7] harness: Make the test exit with a code matching the - pass/fail state - -This way we can use the exit code to check whether the tests passed or -failed, and fail the package build. ---- - harness/runtests.sh | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/harness/runtests.sh b/harness/runtests.sh -index 717c72a..d7fd247 100755 ---- a/harness/runtests.sh -+++ b/harness/runtests.sh -@@ -3,7 +3,7 @@ - passes=0 - fails=0 - --echo "Test run starting at" `date` -+echo "Test run starting at $(date)" - - while [ $# -ge 1 ] ; do - this_test=$1 -@@ -16,4 +16,6 @@ while [ $# -ge 1 ] ; do - done - - echo "Pass: $passes Fail: $fails" --echo "Test run complete at" `date` -+echo "Test run complete at $(date)" -+ -+exit $fails --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0007-man-Fix-period-formatting.patch libaio-0.3.112/debian/patches/0007-man-Fix-period-formatting.patch --- libaio-0.3.112/debian/patches/0007-man-Fix-period-formatting.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0007-man-Fix-period-formatting.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,212 @@ +From 0319efeeea3dbd4b53b81934b4f24bba96d77959 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:18:05 +0200 +Subject: [PATCH libaio 07/26] man: Fix period formatting + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + man/io.3 | 13 +++++-------- + man/io_fsync.3 | 2 +- + man/io_getevents.3 | 3 +-- + man/io_prep_fsync.3 | 2 +- + man/io_prep_pread.3 | 5 ++--- + man/io_prep_pwrite.3 | 5 ++--- + man/io_queue_release.3 | 2 +- + man/io_queue_run.3 | 2 +- + man/io_queue_wait.3 | 2 +- + man/io_submit.3 | 8 ++++---- + 10 files changed, 19 insertions(+), 25 deletions(-) + +diff --git a/man/io.3 b/man/io.3 +index e4fe108..7b8ab5e 100644 +--- a/man/io.3 ++++ b/man/io.3 +@@ -17,8 +17,8 @@ then immediately resume normal work while the I/O operations are + executed in parallel. + + These functions are part of the library with realtime functions named +-.IR "libaio" +-. They are not actually part of the ++.IR libaio . ++They are not actually part of the + .IR "libc" + binary. + The implementation of these functions can be done using support in the +@@ -98,8 +98,7 @@ where the read data is stored. + .TP + .IR "long u.c.nbytes" + This element specifies the length of the buffer pointed to by +-.IR "io_buf" +-. ++.IR io_buf . + .TP + .IR "int aio_reqprio" + Is not currently used. +@@ -111,8 +110,7 @@ and store the next + .IR "u.c.nbytes" + bytes in the + buffer pointed to by +-.IR "buf" +-. ++.IR buf . + .TP + .B "IO_CMD_PWRITE" + Start a write operation. Write +@@ -120,8 +118,7 @@ Start a write operation. Write + bytes starting at + .IR "buf" + into the file starting at position +-.IR "u.c.offset" +-. ++.IR u.c.offset . + .TP + .B "IO_CMD_NOP" + Do nothing for this control block. This value is useful sometimes when +diff --git a/man/io_fsync.3 b/man/io_fsync.3 +index 77a62ff..03c81bc 100644 +--- a/man/io_fsync.3 ++++ b/man/io_fsync.3 +@@ -39,7 +39,7 @@ resources (mainly computation time). + Calling this function forces all I/O operations operating queued at the + time of the function call operating on the file descriptor + .IR "iocb->io_fildes" +-into the synchronized I/O completion state . The ++into the synchronized I/O completion state. The + .IR "io_fsync" + function returns + immediately but the notification through the method described in +diff --git a/man/io_getevents.3 b/man/io_getevents.3 +index c8f2676..24c07c3 100644 +--- a/man/io_getevents.3 ++++ b/man/io_getevents.3 +@@ -107,8 +107,7 @@ argument is specified as NULL, then no signal mask manipulation is + performed (and thus + .BR io_pgetevents () + behaves the same as +-.BR io_getevents() +-) . ++.BR io_getevents() ). + .SH ERRORS + .TP + .B EINVAL +diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3 +index 3a5f952..cf4ecff 100644 +--- a/man/io_prep_fsync.3 ++++ b/man/io_prep_fsync.3 +@@ -62,7 +62,7 @@ forced to the relevant completion state. The completion of + subsequent I/O on the file descriptor is not guaranteed to be + completed in a synchronized fashion. + .PP +-This function returns immediately . To schedule the operation, the ++This function returns immediately. To schedule the operation, the + function + .IR io_submit + must be called. +diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3 +index a4df182..6d66c0f 100644 +--- a/man/io_prep_pread.3 ++++ b/man/io_prep_pread.3 +@@ -44,15 +44,14 @@ bytes of the file for which + is a descriptor are written to the buffer + starting at + .TP +-.IR "iocb->u.c.buf = buf" +-. ++.IR "iocb->u.c.buf = buf" . + .br + Reading starts at the absolute position + .TP + .IR "ioc->u.c.offset = offset" + in the file. + .PP +-This function returns immediately . To schedule the operation, the ++This function returns immediately. To schedule the operation, the + function + .IR io_submit + must be called. +diff --git a/man/io_prep_pwrite.3 b/man/io_prep_pwrite.3 +index 73c62c7..98b3a65 100644 +--- a/man/io_prep_pwrite.3 ++++ b/man/io_prep_pwrite.3 +@@ -42,15 +42,14 @@ bytes of the file for which + is a descriptor are written from the buffer + starting at + .TP +-.IR "iocb->u.c.buf = buf" +-. ++.IR "iocb->u.c.buf = buf" . + .br + Writing starts at the absolute position + .TP + .IR "ioc->u.c.offset = offset" + in the file. + .PP +-This function returns immediately . To schedule the operation, the ++This function returns immediately. To schedule the operation, the + function + .IR io_submit + must be called. +diff --git a/man/io_queue_release.3 b/man/io_queue_release.3 +index f927562..db91bad 100644 +--- a/man/io_queue_release.3 ++++ b/man/io_queue_release.3 +@@ -12,7 +12,7 @@ io_queue_release \- Release the context associated with the userspace handle + .sp + .SH DESCRIPTION + .B io_queue_release +-destroys the context associated with the userspace handle. May cancel any outstanding ++destroys the context associated with the userspace handle. May cancel any outstanding + AIOs and block on completion. + + .B cts. +diff --git a/man/io_queue_run.3 b/man/io_queue_run.3 +index 35f385b..018257f 100644 +--- a/man/io_queue_run.3 ++++ b/man/io_queue_run.3 +@@ -30,7 +30,7 @@ referenced data outside of the program's accessible address space. + .I ctx + refers to an unitialized aio context, the iocb pointed to by + .I iocbs +-contains an improperly initialized iocb, ++contains an improperly initialized iocb. + .TP + .B ENOSYS + Not implemented. +diff --git a/man/io_queue_wait.3 b/man/io_queue_wait.3 +index eb6db83..e3598d9 100644 +--- a/man/io_queue_wait.3 ++++ b/man/io_queue_wait.3 +@@ -36,7 +36,7 @@ referenced data outside of the program's accessible address space. + .I ctx + refers to an unitialized aio context, the iocb pointed to by + .I iocbs +-contains an improperly initialized iocb, ++contains an improperly initialized iocb. + .TP + .B ENOSYS + Not implemented. +diff --git a/man/io_submit.3 b/man/io_submit.3 +index a810b3f..76e68d1 100644 +--- a/man/io_submit.3 ++++ b/man/io_submit.3 +@@ -49,12 +49,12 @@ gets the + .IR "nr" + requests from the array pointed to + by +-.IR "iocbs" +-. The operation to be performed is determined by the ++.IR "iocbs" . ++The operation to be performed is determined by the + .IR "aio_lio_opcode" + member in each element of +-.IR "iocbs" +-. If this ++.IR "iocbs" . ++If this + field is + .B "IO_CMD_PREAD" + a read operation is enqueued, similar to a call +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0007-man-Remove-spurious-spaces.patch libaio-0.3.112/debian/patches/0007-man-Remove-spurious-spaces.patch --- libaio-0.3.112/debian/patches/0007-man-Remove-spurious-spaces.patch 2019-02-25 01:49:18.000000000 +0000 +++ libaio-0.3.112/debian/patches/0007-man-Remove-spurious-spaces.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -From f8d3e59b6ff6a26f36efa611d956bcc2e03c7ee7 Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Sun, 13 Aug 2017 20:36:23 +0200 -Subject: [PATCH 07/15] man: Remove spurious spaces - -Signed-off-by: Guillem Jover ---- - man/io_cancel.3 | 2 +- - man/io_queue_run.3 | 2 +- - man/io_queue_wait.3 | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/man/io_cancel.3 b/man/io_cancel.3 -index 9ac1b40..261a407 100644 ---- a/man/io_cancel.3 -+++ b/man/io_cancel.3 -@@ -33,7 +33,7 @@ have to be overwritten soon. As an example, assume an application, which - writes data in files in a situation where new incoming data would have - to be written in a file which will be updated by an enqueued request. - .SH "RETURN VALUES" --0 is returned on success , otherwise returns errno. -+0 is returned on success, otherwise returns errno. - .SH ERRORS - .TP - .B EFAULT -diff --git a/man/io_queue_run.3 b/man/io_queue_run.3 -index 018257f..b05851c 100644 ---- a/man/io_queue_run.3 -+++ b/man/io_queue_run.3 -@@ -14,7 +14,7 @@ io_queue_run \- Handle completed io requests - .fi - .SH DESCRIPTION - .B io_queue_run --Attempts to read all the events events from -+Attempts to read all the events events from - the completion queue for the aio_context specified by ctx_id. - .SH "RETURN VALUES" - May return -diff --git a/man/io_queue_wait.3 b/man/io_queue_wait.3 -index e3598d9..fff8141 100644 ---- a/man/io_queue_wait.3 -+++ b/man/io_queue_wait.3 -@@ -12,7 +12,7 @@ io_queue_wait \- Wait for io requests to complete - .BI "int io_queue_wait(io_context_t ctx, const struct timespec *timeout);" - .fi - .SH DESCRIPTION --Attempts to read an event from -+Attempts to read an event from - the completion queue for the aio_context specified by ctx_id. - .SH "RETURN VALUES" - May return --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0008-man-Remove-spurious-spaces.patch libaio-0.3.112/debian/patches/0008-man-Remove-spurious-spaces.patch --- libaio-0.3.112/debian/patches/0008-man-Remove-spurious-spaces.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0008-man-Remove-spurious-spaces.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,55 @@ +From 767c68f7ea77f46fe9a227c2dc64a48f8eaa06f5 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:18:06 +0200 +Subject: [PATCH libaio 08/26] man: Remove spurious spaces + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + man/io_cancel.3 | 2 +- + man/io_queue_run.3 | 2 +- + man/io_queue_wait.3 | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/man/io_cancel.3 b/man/io_cancel.3 +index 9ac1b40..261a407 100644 +--- a/man/io_cancel.3 ++++ b/man/io_cancel.3 +@@ -33,7 +33,7 @@ have to be overwritten soon. As an example, assume an application, which + writes data in files in a situation where new incoming data would have + to be written in a file which will be updated by an enqueued request. + .SH "RETURN VALUES" +-0 is returned on success , otherwise returns errno. ++0 is returned on success, otherwise returns errno. + .SH ERRORS + .TP + .B EFAULT +diff --git a/man/io_queue_run.3 b/man/io_queue_run.3 +index 018257f..b05851c 100644 +--- a/man/io_queue_run.3 ++++ b/man/io_queue_run.3 +@@ -14,7 +14,7 @@ io_queue_run \- Handle completed io requests + .fi + .SH DESCRIPTION + .B io_queue_run +-Attempts to read all the events events from ++Attempts to read all the events events from + the completion queue for the aio_context specified by ctx_id. + .SH "RETURN VALUES" + May return +diff --git a/man/io_queue_wait.3 b/man/io_queue_wait.3 +index e3598d9..fff8141 100644 +--- a/man/io_queue_wait.3 ++++ b/man/io_queue_wait.3 +@@ -12,7 +12,7 @@ io_queue_wait \- Wait for io requests to complete + .BI "int io_queue_wait(io_context_t ctx, const struct timespec *timeout);" + .fi + .SH DESCRIPTION +-Attempts to read an event from ++Attempts to read an event from + the completion queue for the aio_context specified by ctx_id. + .SH "RETURN VALUES" + May return +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0008-man-Remove-spurious-text.patch libaio-0.3.112/debian/patches/0008-man-Remove-spurious-text.patch --- libaio-0.3.112/debian/patches/0008-man-Remove-spurious-text.patch 2019-02-25 01:49:18.000000000 +0000 +++ libaio-0.3.112/debian/patches/0008-man-Remove-spurious-text.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -From a1b19f2b9806c1585bab7ecc7ffb3df477498dce Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Fri, 8 Feb 2019 22:31:15 +0100 -Subject: [PATCH 08/15] man: Remove spurious text - -Signed-off-by: Guillem Jover ---- - man/io_getevents.3 | 1 - - man/io_prep_pread.3 | 2 +- - man/io_queue_release.3 | 3 +-- - 3 files changed, 2 insertions(+), 4 deletions(-) - -diff --git a/man/io_getevents.3 b/man/io_getevents.3 -index 24c07c3..37e9f7a 100644 ---- a/man/io_getevents.3 -+++ b/man/io_getevents.3 -@@ -73,7 +73,6 @@ events happens or until a signal is caught. - The following - .BR io_pgetevents () - call: --call: - .PP - .in +4n - .EX -diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3 -index 6d66c0f..b32fe4c 100644 ---- a/man/io_prep_pread.3 -+++ b/man/io_prep_pread.3 -@@ -20,7 +20,7 @@ io_prep_pread \- Set up asynchronous read - .br - .sp - .BI "inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) --" -+. - .sp - struct iocb { - void *data; -diff --git a/man/io_queue_release.3 b/man/io_queue_release.3 -index db91bad..6444aff 100644 ---- a/man/io_queue_release.3 -+++ b/man/io_queue_release.3 -@@ -14,8 +14,7 @@ io_queue_release \- Release the context associated with the userspace handle - .B io_queue_release - destroys the context associated with the userspace handle. May cancel any outstanding - AIOs and block on completion. -- --.B cts. -+. - .SH "RETURN VALUES" - On success, - .B io_queue_release --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0009-man-Add-None-to-empty-sections.patch libaio-0.3.112/debian/patches/0009-man-Add-None-to-empty-sections.patch --- libaio-0.3.112/debian/patches/0009-man-Add-None-to-empty-sections.patch 2019-02-25 01:49:18.000000000 +0000 +++ libaio-0.3.112/debian/patches/0009-man-Add-None-to-empty-sections.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -From 6d39d8f03e277b459d05b8d22f0baf0d496037f2 Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Sun, 13 Aug 2017 20:36:23 +0200 -Subject: [PATCH 09/15] man: Add "None" to empty sections - -Signed-off-by: Guillem Jover ---- - man/io_set_callback.3 | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/man/io_set_callback.3 b/man/io_set_callback.3 -index 71efd2f..4ee4b05 100644 ---- a/man/io_set_callback.3 -+++ b/man/io_set_callback.3 -@@ -27,7 +27,9 @@ typedef void (*io_callback_t)(io_context_t ctx, struct iocb *iocb, long res, lon - The callback is not done if the caller uses raw events from - io_getevents, only with the library helpers. - .SH "RETURN VALUES" -+None. - .SH ERRORS -+None. - .SH "SEE ALSO" - .BR io (3), - .BR io_cancel (3), --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0009-man-Remove-spurious-text.patch libaio-0.3.112/debian/patches/0009-man-Remove-spurious-text.patch --- libaio-0.3.112/debian/patches/0009-man-Remove-spurious-text.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0009-man-Remove-spurious-text.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,55 @@ +From 5f0e08fda606b960eb1652f5e6743dc031e595f1 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:18:07 +0200 +Subject: [PATCH libaio 09/26] man: Remove spurious text + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + man/io_getevents.3 | 1 - + man/io_prep_pread.3 | 2 +- + man/io_queue_release.3 | 3 +-- + 3 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/man/io_getevents.3 b/man/io_getevents.3 +index 24c07c3..37e9f7a 100644 +--- a/man/io_getevents.3 ++++ b/man/io_getevents.3 +@@ -73,7 +73,6 @@ events happens or until a signal is caught. + The following + .BR io_pgetevents () + call: +-call: + .PP + .in +4n + .EX +diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3 +index 6d66c0f..b32fe4c 100644 +--- a/man/io_prep_pread.3 ++++ b/man/io_prep_pread.3 +@@ -20,7 +20,7 @@ io_prep_pread \- Set up asynchronous read + .br + .sp + .BI "inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) +-" ++. + .sp + struct iocb { + void *data; +diff --git a/man/io_queue_release.3 b/man/io_queue_release.3 +index db91bad..6444aff 100644 +--- a/man/io_queue_release.3 ++++ b/man/io_queue_release.3 +@@ -14,8 +14,7 @@ io_queue_release \- Release the context associated with the userspace handle + .B io_queue_release + destroys the context associated with the userspace handle. May cancel any outstanding + AIOs and block on completion. +- +-.B cts. ++. + .SH "RETURN VALUES" + On success, + .B io_queue_release +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0010-man-Add-None-to-empty-sections.patch libaio-0.3.112/debian/patches/0010-man-Add-None-to-empty-sections.patch --- libaio-0.3.112/debian/patches/0010-man-Add-None-to-empty-sections.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0010-man-Add-None-to-empty-sections.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,28 @@ +From 69874fec6fef24564302b2efa9af53af07851058 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:18:08 +0200 +Subject: [PATCH libaio 10/26] man: Add "None" to empty sections + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + man/io_set_callback.3 | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/man/io_set_callback.3 b/man/io_set_callback.3 +index 71efd2f..4ee4b05 100644 +--- a/man/io_set_callback.3 ++++ b/man/io_set_callback.3 +@@ -27,7 +27,9 @@ typedef void (*io_callback_t)(io_context_t ctx, struct iocb *iocb, long res, lon + The callback is not done if the caller uses raw events from + io_getevents, only with the library helpers. + .SH "RETURN VALUES" ++None. + .SH ERRORS ++None. + .SH "SEE ALSO" + .BR io (3), + .BR io_cancel (3), +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0010-man-Fix-typos.patch libaio-0.3.112/debian/patches/0010-man-Fix-typos.patch --- libaio-0.3.112/debian/patches/0010-man-Fix-typos.patch 2019-02-25 01:49:18.000000000 +0000 +++ libaio-0.3.112/debian/patches/0010-man-Fix-typos.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,212 +0,0 @@ -From d91ef01a7ab8c00b9a068e14669dc19c4f2539ec Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Sun, 13 Aug 2017 20:36:23 +0200 -Subject: [PATCH 10/15] man: Fix typos - -Signed-off-by: Guillem Jover ---- - man/io.3 | 2 +- - man/io_fsync.3 | 4 ++-- - man/io_getevents.3 | 4 ++-- - man/io_prep_fsync.3 | 2 +- - man/io_prep_pread.3 | 2 +- - man/io_prep_pwrite.3 | 4 ++-- - man/io_queue_init.3 | 2 +- - man/io_queue_release.3 | 2 +- - man/io_queue_run.3 | 4 ++-- - man/io_queue_wait.3 | 2 +- - man/io_set_callback.3 | 2 +- - man/io_submit.3 | 2 +- - 12 files changed, 16 insertions(+), 16 deletions(-) - -diff --git a/man/io.3 b/man/io.3 -index 7b8ab5e..bc529ea 100644 ---- a/man/io.3 -+++ b/man/io.3 -@@ -1,7 +1,7 @@ - .TH io 3 2002-09-12 "Linux 2.4" Linux IO" - .SH NAME - io \- Asynchronous IO --.SH SYNOPSYS -+.SH SYNOPSIS - .nf - .B #include - .sp -diff --git a/man/io_fsync.3 b/man/io_fsync.3 -index 03c81bc..5400d41 100644 ---- a/man/io_fsync.3 -+++ b/man/io_fsync.3 -@@ -7,7 +7,7 @@ - .TH io_fsync 3 2002-09-12 "Linux 2.4" Linux AIO" - .SH NAME - io_fsync \- Synchronize a file's complete in-core state with that on disk --.SH SYNOPSYS -+.SH SYNOPSIS - .nf - .B #include - .sp -@@ -58,7 +58,7 @@ referenced data outside of the program's accessible address space. - .TP - .B EINVAL - .I ctx --refers to an unitialized aio context, the iocb pointed to by -+refers to an uninitialized aio context, the iocb pointed to by - .I iocbs - contains an improperly initialized iocb, - .TP -diff --git a/man/io_getevents.3 b/man/io_getevents.3 -index 37e9f7a..95fa86e 100644 ---- a/man/io_getevents.3 -+++ b/man/io_getevents.3 -@@ -64,11 +64,11 @@ is analogous to the relationship between - .BR select (2) - and - .BR pselect (2): --similar -+similar to - .BR pselect (2), - .BR pgetevents () - allows an application to safely wait until either an aio completion --events happens or until a signal is caught. -+event happens or until a signal is caught. - .PP - The following - .BR io_pgetevents () -diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3 -index cf4ecff..0397172 100644 ---- a/man/io_prep_fsync.3 -+++ b/man/io_prep_fsync.3 -@@ -8,7 +8,7 @@ - .TH io_prep_fsync 3 2002-09-12 "Linux 2.4" Linux AIO" - .SH NAME - io_prep_fsync \- Synchronize a file's complete in-core state with that on disk --.SH SYNOPSYS -+.SH SYNOPSIS - .nf - .B #include - .br -diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3 -index b32fe4c..3c28f61 100644 ---- a/man/io_prep_pread.3 -+++ b/man/io_prep_pread.3 -@@ -11,7 +11,7 @@ - .TH io_prep_pread 3 2002-09-12 "Linux 2.4" Linux AIO" - .SH NAME - io_prep_pread \- Set up asynchronous read --.SH SYNOPSYS -+.SH SYNOPSIS - .nf - .B #include - .sp -diff --git a/man/io_prep_pwrite.3 b/man/io_prep_pwrite.3 -index 98b3a65..69479c2 100644 ---- a/man/io_prep_pwrite.3 -+++ b/man/io_prep_pwrite.3 -@@ -11,7 +11,7 @@ - .TH io_prep_pwrite 3 2002-09-12 "Linux 2.4" Linux AIO" - .SH NAME - io_prep_pwrite \- Set up iocb for asynchronous writes --.SH SYNOPSYS -+.SH SYNOPSIS - .nf - .B #include - .br -@@ -31,7 +31,7 @@ struct iocb { - }; - .fi - .SH DESCRIPTION --io_prep_write is a convenicence function for setting up parallel writes. -+io_prep_write is a convenience function for setting up parallel writes. - - The first - .TP -diff --git a/man/io_queue_init.3 b/man/io_queue_init.3 -index 666dfae..9c04b3f 100644 ---- a/man/io_queue_init.3 -+++ b/man/io_queue_init.3 -@@ -39,7 +39,7 @@ referenced data outside of the program's accessible address space. - .I maxevents - is <= 0 or - .IR ctx --is an invalid memory locattion. -+is an invalid memory location. - .TP - .B ENOSYS - Not implemented. -diff --git a/man/io_queue_release.3 b/man/io_queue_release.3 -index 6444aff..5c9ded1 100644 ---- a/man/io_queue_release.3 -+++ b/man/io_queue_release.3 -@@ -24,7 +24,7 @@ error is one of the Exxx values defined in the Errors section. - .TP - .B EINVAL - .I ctx --refers to an unitialized aio context, the iocb pointed to by -+refers to an uninitialized aio context, the iocb pointed to by - .I iocbs - contains an improperly initialized iocb, - .TP -diff --git a/man/io_queue_run.3 b/man/io_queue_run.3 -index b05851c..8e0691c 100644 ---- a/man/io_queue_run.3 -+++ b/man/io_queue_run.3 -@@ -14,7 +14,7 @@ io_queue_run \- Handle completed io requests - .fi - .SH DESCRIPTION - .B io_queue_run --Attempts to read all the events events from -+Attempts to read all the events from - the completion queue for the aio_context specified by ctx_id. - .SH "RETURN VALUES" - May return -@@ -28,7 +28,7 @@ referenced data outside of the program's accessible address space. - .TP - .B EINVAL - .I ctx --refers to an unitialized aio context, the iocb pointed to by -+refers to an uninitialized aio context, the iocb pointed to by - .I iocbs - contains an improperly initialized iocb. - .TP -diff --git a/man/io_queue_wait.3 b/man/io_queue_wait.3 -index fff8141..0cf0497 100644 ---- a/man/io_queue_wait.3 -+++ b/man/io_queue_wait.3 -@@ -34,7 +34,7 @@ referenced data outside of the program's accessible address space. - .TP - .B EINVAL - .I ctx --refers to an unitialized aio context, the iocb pointed to by -+refers to an uninitialized aio context, the iocb pointed to by - .I iocbs - contains an improperly initialized iocb. - .TP -diff --git a/man/io_set_callback.3 b/man/io_set_callback.3 -index 4ee4b05..3599e8c 100644 ---- a/man/io_set_callback.3 -+++ b/man/io_set_callback.3 -@@ -2,7 +2,7 @@ - .TH io_set_callback 3 2002-09-12 "Linux 2.4" Linux AIO" - .SH NAME - io_set_callback \- Set up io completion callback function --.SH SYNOPSYS -+.SH SYNOPSIS - .nf - .B #include - .br -diff --git a/man/io_submit.3 b/man/io_submit.3 -index 76e68d1..3ae8721 100644 ---- a/man/io_submit.3 -+++ b/man/io_submit.3 -@@ -110,7 +110,7 @@ referenced data outside of the program's accessible address space. - .TP - .B EINVAL - .I ctx --refers to an unitialized aio context, the iocb pointed to by -+refers to an uninitialized aio context, the iocb pointed to by - .I iocbs - contains an improperly initialized iocb, - .TP --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0011-man-Fix-title-header.patch libaio-0.3.112/debian/patches/0011-man-Fix-title-header.patch --- libaio-0.3.112/debian/patches/0011-man-Fix-title-header.patch 2019-02-25 01:49:18.000000000 +0000 +++ libaio-0.3.112/debian/patches/0011-man-Fix-title-header.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,179 +0,0 @@ -From cdc581ebea3a745ca7c43130a1c0ec5366fa2b19 Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Sun, 10 Dec 2017 20:20:04 +0100 -Subject: [PATCH 11/15] man: Fix title header - -- Update year. -- Balance double quotes. -- Remove version from source argument as recommended in man-pages(7). -- Fix all sections numbers to 3. - -Signed-off-by: Guillem Jover ---- - man/io.3 | 2 +- - man/io_cancel.3 | 2 +- - man/io_fsync.3 | 2 +- - man/io_getevents.3 | 2 +- - man/io_prep_fsync.3 | 2 +- - man/io_prep_pread.3 | 2 +- - man/io_prep_pwrite.3 | 2 +- - man/io_queue_init.3 | 2 +- - man/io_queue_release.3 | 2 +- - man/io_queue_run.3 | 2 +- - man/io_queue_wait.3 | 2 +- - man/io_set_callback.3 | 2 +- - man/io_submit.3 | 2 +- - 13 files changed, 13 insertions(+), 13 deletions(-) - -diff --git a/man/io.3 b/man/io.3 -index bc529ea..52f0ab3 100644 ---- a/man/io.3 -+++ b/man/io.3 -@@ -1,4 +1,4 @@ --.TH io 3 2002-09-12 "Linux 2.4" Linux IO" -+.TH io 3 2017-12-10 "Linux" "Linux AIO" - .SH NAME - io \- Asynchronous IO - .SH SYNOPSIS -diff --git a/man/io_cancel.3 b/man/io_cancel.3 -index 261a407..62272c7 100644 ---- a/man/io_cancel.3 -+++ b/man/io_cancel.3 -@@ -1,4 +1,4 @@ --.TH io_cancel 2 2002-09-03 "Linux 2.4" "Linux AIO" -+.TH io_cancel 3 2017-12-10 "Linux" "Linux AIO" - .SH NAME - io_cancel \- Cancel io requests - .SH SYNOPSIS -diff --git a/man/io_fsync.3 b/man/io_fsync.3 -index 5400d41..6938f6b 100644 ---- a/man/io_fsync.3 -+++ b/man/io_fsync.3 -@@ -4,7 +4,7 @@ - .\" io_set_callback(iocb, cb); - .\" return io_submit(ctx, 1, &iocb); - .\" } --.TH io_fsync 3 2002-09-12 "Linux 2.4" Linux AIO" -+.TH io_fsync 3 2017-12-10 "Linux" "Linux AIO" - .SH NAME - io_fsync \- Synchronize a file's complete in-core state with that on disk - .SH SYNOPSIS -diff --git a/man/io_getevents.3 b/man/io_getevents.3 -index 95fa86e..fd67929 100644 ---- a/man/io_getevents.3 -+++ b/man/io_getevents.3 -@@ -16,7 +16,7 @@ - .\" struct io_event *events, - .\" struct timespec *timeout) - .\" --.TH io_getevents 2 2002-09-03 "Linux 2.4" "Linux AIO" -+.TH io_getevents 3 2017-12-10 "Linux" "Linux AIO" - .SH NAME - io_getevents, aio_pgetevents \- Read resulting events from io requests - .SH SYNOPSIS -diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3 -index 0397172..7b6dd4b 100644 ---- a/man/io_prep_fsync.3 -+++ b/man/io_prep_fsync.3 -@@ -5,7 +5,7 @@ - .\" iocb->aio_lio_opcode = IO_CMD_FSYNC; - .\" iocb->aio_reqprio = 0; - .\" } --.TH io_prep_fsync 3 2002-09-12 "Linux 2.4" Linux AIO" -+.TH io_prep_fsync 3 2017-12-10 "Linux" "Linux AIO" - .SH NAME - io_prep_fsync \- Synchronize a file's complete in-core state with that on disk - .SH SYNOPSIS -diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3 -index 3c28f61..a0508d7 100644 ---- a/man/io_prep_pread.3 -+++ b/man/io_prep_pread.3 -@@ -8,7 +8,7 @@ - .\" iocb->u.c.nbytes = count; - .\" iocb->u.c.offset = offset; - .\" } --.TH io_prep_pread 3 2002-09-12 "Linux 2.4" Linux AIO" -+.TH io_prep_pread 3 2017-12-10 "Linux" "Linux AIO" - .SH NAME - io_prep_pread \- Set up asynchronous read - .SH SYNOPSIS -diff --git a/man/io_prep_pwrite.3 b/man/io_prep_pwrite.3 -index 69479c2..8ce96ce 100644 ---- a/man/io_prep_pwrite.3 -+++ b/man/io_prep_pwrite.3 -@@ -8,7 +8,7 @@ - .\" iocb->u.c.nbytes = count; - .\" iocb->u.c.offset = offset; - .\" } --.TH io_prep_pwrite 3 2002-09-12 "Linux 2.4" Linux AIO" -+.TH io_prep_pwrite 3 2017-12-10 "Linux" "Linux AIO" - .SH NAME - io_prep_pwrite \- Set up iocb for asynchronous writes - .SH SYNOPSIS -diff --git a/man/io_queue_init.3 b/man/io_queue_init.3 -index 9c04b3f..b09da50 100644 ---- a/man/io_queue_init.3 -+++ b/man/io_queue_init.3 -@@ -1,4 +1,4 @@ --.TH io_queue_init 2 2002-09-03 "Linux 2.4" "Linux AIO" -+.TH io_queue_init 3 2017-12-10 "Linux" "Linux AIO" - .SH NAME - io_queue_init \- Initialize asynchronous io state machine - -diff --git a/man/io_queue_release.3 b/man/io_queue_release.3 -index 5c9ded1..d6d5def 100644 ---- a/man/io_queue_release.3 -+++ b/man/io_queue_release.3 -@@ -1,4 +1,4 @@ --.TH io_queue_release 2 2002-09-03 "Linux 2.4" "Linux AIO" -+.TH io_queue_release 3 2017-12-10 "Linux" "Linux AIO" - .SH NAME - io_queue_release \- Release the context associated with the userspace handle - .SH SYNOPSIS -diff --git a/man/io_queue_run.3 b/man/io_queue_run.3 -index 8e0691c..ff6eb78 100644 ---- a/man/io_queue_run.3 -+++ b/man/io_queue_run.3 -@@ -1,4 +1,4 @@ --.TH io_queue_run 2 2002-09-03 "Linux 2.4" "Linux AIO" -+.TH io_queue_run 3 2017-12-10 "Linux" "Linux AIO" - .SH NAME - io_queue_run \- Handle completed io requests - .SH SYNOPSIS -diff --git a/man/io_queue_wait.3 b/man/io_queue_wait.3 -index 0cf0497..dedfcdd 100644 ---- a/man/io_queue_wait.3 -+++ b/man/io_queue_wait.3 -@@ -1,4 +1,4 @@ --.TH io_queue_wait 2 2002-09-03 "Linux 2.4" "Linux AIO" -+.TH io_queue_wait 3 2017-12-10 "Linux" "Linux AIO" - .SH NAME - io_queue_wait \- Wait for io requests to complete - .SH SYNOPSIS -diff --git a/man/io_set_callback.3 b/man/io_set_callback.3 -index 3599e8c..e8d8e60 100644 ---- a/man/io_set_callback.3 -+++ b/man/io_set_callback.3 -@@ -1,5 +1,5 @@ - .\"static inline void io_set_callback(struct iocb *iocb, io_callback_t cb) --.TH io_set_callback 3 2002-09-12 "Linux 2.4" Linux AIO" -+.TH io_set_callback 3 2017-12-10 "Linux" "Linux AIO" - .SH NAME - io_set_callback \- Set up io completion callback function - .SH SYNOPSIS -diff --git a/man/io_submit.3 b/man/io_submit.3 -index 3ae8721..953246c 100644 ---- a/man/io_submit.3 -+++ b/man/io_submit.3 -@@ -10,7 +10,7 @@ - .\" * are available to queue any iocbs. Will return 0 if nr is 0. Will - .\" * fail with -ENOSYS if not implemented. - .\" */ --.TH io_submit 2 2002-09-02 "Linux 2.4" "Linux AIO" -+.TH io_submit 3 2017-12-10 "Linux" "Linux AIO" - .SH NAME - io_submit \- Submit io requests - .SH SYNOPSIS --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0011-man-Fix-typos.patch libaio-0.3.112/debian/patches/0011-man-Fix-typos.patch --- libaio-0.3.112/debian/patches/0011-man-Fix-typos.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0011-man-Fix-typos.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,213 @@ +From 716fe28caeefd07235413c309d316e9a92587e0c Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:18:09 +0200 +Subject: [PATCH libaio 11/26] man: Fix typos + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + man/io.3 | 2 +- + man/io_fsync.3 | 4 ++-- + man/io_getevents.3 | 4 ++-- + man/io_prep_fsync.3 | 2 +- + man/io_prep_pread.3 | 2 +- + man/io_prep_pwrite.3 | 4 ++-- + man/io_queue_init.3 | 2 +- + man/io_queue_release.3 | 2 +- + man/io_queue_run.3 | 4 ++-- + man/io_queue_wait.3 | 2 +- + man/io_set_callback.3 | 2 +- + man/io_submit.3 | 2 +- + 12 files changed, 16 insertions(+), 16 deletions(-) + +diff --git a/man/io.3 b/man/io.3 +index 7b8ab5e..bc529ea 100644 +--- a/man/io.3 ++++ b/man/io.3 +@@ -1,7 +1,7 @@ + .TH io 3 2002-09-12 "Linux 2.4" Linux IO" + .SH NAME + io \- Asynchronous IO +-.SH SYNOPSYS ++.SH SYNOPSIS + .nf + .B #include + .sp +diff --git a/man/io_fsync.3 b/man/io_fsync.3 +index 03c81bc..5400d41 100644 +--- a/man/io_fsync.3 ++++ b/man/io_fsync.3 +@@ -7,7 +7,7 @@ + .TH io_fsync 3 2002-09-12 "Linux 2.4" Linux AIO" + .SH NAME + io_fsync \- Synchronize a file's complete in-core state with that on disk +-.SH SYNOPSYS ++.SH SYNOPSIS + .nf + .B #include + .sp +@@ -58,7 +58,7 @@ referenced data outside of the program's accessible address space. + .TP + .B EINVAL + .I ctx +-refers to an unitialized aio context, the iocb pointed to by ++refers to an uninitialized aio context, the iocb pointed to by + .I iocbs + contains an improperly initialized iocb, + .TP +diff --git a/man/io_getevents.3 b/man/io_getevents.3 +index 37e9f7a..95fa86e 100644 +--- a/man/io_getevents.3 ++++ b/man/io_getevents.3 +@@ -64,11 +64,11 @@ is analogous to the relationship between + .BR select (2) + and + .BR pselect (2): +-similar ++similar to + .BR pselect (2), + .BR pgetevents () + allows an application to safely wait until either an aio completion +-events happens or until a signal is caught. ++event happens or until a signal is caught. + .PP + The following + .BR io_pgetevents () +diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3 +index cf4ecff..0397172 100644 +--- a/man/io_prep_fsync.3 ++++ b/man/io_prep_fsync.3 +@@ -8,7 +8,7 @@ + .TH io_prep_fsync 3 2002-09-12 "Linux 2.4" Linux AIO" + .SH NAME + io_prep_fsync \- Synchronize a file's complete in-core state with that on disk +-.SH SYNOPSYS ++.SH SYNOPSIS + .nf + .B #include + .br +diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3 +index b32fe4c..3c28f61 100644 +--- a/man/io_prep_pread.3 ++++ b/man/io_prep_pread.3 +@@ -11,7 +11,7 @@ + .TH io_prep_pread 3 2002-09-12 "Linux 2.4" Linux AIO" + .SH NAME + io_prep_pread \- Set up asynchronous read +-.SH SYNOPSYS ++.SH SYNOPSIS + .nf + .B #include + .sp +diff --git a/man/io_prep_pwrite.3 b/man/io_prep_pwrite.3 +index 98b3a65..69479c2 100644 +--- a/man/io_prep_pwrite.3 ++++ b/man/io_prep_pwrite.3 +@@ -11,7 +11,7 @@ + .TH io_prep_pwrite 3 2002-09-12 "Linux 2.4" Linux AIO" + .SH NAME + io_prep_pwrite \- Set up iocb for asynchronous writes +-.SH SYNOPSYS ++.SH SYNOPSIS + .nf + .B #include + .br +@@ -31,7 +31,7 @@ struct iocb { + }; + .fi + .SH DESCRIPTION +-io_prep_write is a convenicence function for setting up parallel writes. ++io_prep_write is a convenience function for setting up parallel writes. + + The first + .TP +diff --git a/man/io_queue_init.3 b/man/io_queue_init.3 +index 666dfae..9c04b3f 100644 +--- a/man/io_queue_init.3 ++++ b/man/io_queue_init.3 +@@ -39,7 +39,7 @@ referenced data outside of the program's accessible address space. + .I maxevents + is <= 0 or + .IR ctx +-is an invalid memory locattion. ++is an invalid memory location. + .TP + .B ENOSYS + Not implemented. +diff --git a/man/io_queue_release.3 b/man/io_queue_release.3 +index 6444aff..5c9ded1 100644 +--- a/man/io_queue_release.3 ++++ b/man/io_queue_release.3 +@@ -24,7 +24,7 @@ error is one of the Exxx values defined in the Errors section. + .TP + .B EINVAL + .I ctx +-refers to an unitialized aio context, the iocb pointed to by ++refers to an uninitialized aio context, the iocb pointed to by + .I iocbs + contains an improperly initialized iocb, + .TP +diff --git a/man/io_queue_run.3 b/man/io_queue_run.3 +index b05851c..8e0691c 100644 +--- a/man/io_queue_run.3 ++++ b/man/io_queue_run.3 +@@ -14,7 +14,7 @@ io_queue_run \- Handle completed io requests + .fi + .SH DESCRIPTION + .B io_queue_run +-Attempts to read all the events events from ++Attempts to read all the events from + the completion queue for the aio_context specified by ctx_id. + .SH "RETURN VALUES" + May return +@@ -28,7 +28,7 @@ referenced data outside of the program's accessible address space. + .TP + .B EINVAL + .I ctx +-refers to an unitialized aio context, the iocb pointed to by ++refers to an uninitialized aio context, the iocb pointed to by + .I iocbs + contains an improperly initialized iocb. + .TP +diff --git a/man/io_queue_wait.3 b/man/io_queue_wait.3 +index fff8141..0cf0497 100644 +--- a/man/io_queue_wait.3 ++++ b/man/io_queue_wait.3 +@@ -34,7 +34,7 @@ referenced data outside of the program's accessible address space. + .TP + .B EINVAL + .I ctx +-refers to an unitialized aio context, the iocb pointed to by ++refers to an uninitialized aio context, the iocb pointed to by + .I iocbs + contains an improperly initialized iocb. + .TP +diff --git a/man/io_set_callback.3 b/man/io_set_callback.3 +index 4ee4b05..3599e8c 100644 +--- a/man/io_set_callback.3 ++++ b/man/io_set_callback.3 +@@ -2,7 +2,7 @@ + .TH io_set_callback 3 2002-09-12 "Linux 2.4" Linux AIO" + .SH NAME + io_set_callback \- Set up io completion callback function +-.SH SYNOPSYS ++.SH SYNOPSIS + .nf + .B #include + .br +diff --git a/man/io_submit.3 b/man/io_submit.3 +index 76e68d1..3ae8721 100644 +--- a/man/io_submit.3 ++++ b/man/io_submit.3 +@@ -110,7 +110,7 @@ referenced data outside of the program's accessible address space. + .TP + .B EINVAL + .I ctx +-refers to an unitialized aio context, the iocb pointed to by ++refers to an uninitialized aio context, the iocb pointed to by + .I iocbs + contains an improperly initialized iocb, + .TP +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0012-man-Fix-markup.patch libaio-0.3.112/debian/patches/0012-man-Fix-markup.patch --- libaio-0.3.112/debian/patches/0012-man-Fix-markup.patch 2019-02-25 01:49:18.000000000 +0000 +++ libaio-0.3.112/debian/patches/0012-man-Fix-markup.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,798 +0,0 @@ -From 469e352950fd873e028f7611aa4bea7ea2ca7521 Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Sun, 10 Dec 2017 20:22:11 +0100 -Subject: [PATCH 12/15] man: Fix markup - -- Remove unnecessary macro argument quoting. -- Variables, pathnames in italics. -- Keywords in bold. -- Man page references in bold, followed by the man page number. -- Fix TP/TQ macro usage. - -Signed-off-by: Guillem Jover ---- - man/io.3 | 38 ++++++++++++++------------- - man/io_cancel.3 | 23 ++++++++++------ - man/io_fsync.3 | 9 ++++--- - man/io_getevents.3 | 33 ++++++++++++++++------- - man/io_prep_fsync.3 | 59 ++++++++++++++++++++++++++++++------------ - man/io_prep_pread.3 | 19 +++++--------- - man/io_prep_pwrite.3 | 14 ++++------ - man/io_queue_init.3 | 34 +++++++++++++++--------- - man/io_queue_release.3 | 16 +++++++----- - man/io_queue_run.3 | 18 ++++++++----- - man/io_queue_wait.3 | 25 +++++++++++------- - man/io_set_callback.3 | 5 ++-- - man/io_submit.3 | 26 +++++++++++-------- - 13 files changed, 195 insertions(+), 124 deletions(-) - -diff --git a/man/io.3 b/man/io.3 -index 52f0ab3..bbb0a2d 100644 ---- a/man/io.3 -+++ b/man/io.3 -@@ -10,16 +10,18 @@ io \- Asynchronous IO - .sp - .fi - .SH DESCRIPTION --The libaio library defines a new set of I/O operations which can -+The -+.B libaio -+library defines a new set of I/O operations which can - significantly reduce the time an application spends waiting at I/O. The - new functions allow a program to initiate one or more I/O operations and - then immediately resume normal work while the I/O operations are - executed in parallel. - - These functions are part of the library with realtime functions named --.IR libaio . -+.BR libaio . - They are not actually part of the --.IR "libc" -+.B libc - binary. - The implementation of these functions can be done using support in the - kernel. -@@ -27,9 +29,9 @@ kernel. - All IO operations operate on files which were opened previously. There - might be arbitrarily many operations running for one file. The - asynchronous I/O operations are controlled using a data structure named --.IR "struct iocb" -+.B struct iocb - It is defined in --.IR "libaio.h" -+.I libaio.h - as follows. - - .nf -@@ -74,7 +76,7 @@ struct iocb { - - .fi - .TP --.IR "int aio_fildes" -+.BI int " aio_fildes" - This element specifies the file descriptor to be used for the - operation. It must be a legal descriptor, otherwise the operation will - fail. -@@ -82,55 +84,55 @@ fail. - The device on which the file is opened must allow the seek operation. - I.e., it is not possible to use any of the IO operations on devices - like terminals where an --.IR "lseek" -+.BR lseek (2) - call would lead to an error. - .TP --.IR "long u.c.offset" -+.BI long " u.c.offset" - This element specifies the offset in the file at which the operation (input - or output) is performed. Since the operations are carried out in arbitrary - order and more than one operation for one file descriptor can be - started, one cannot expect a current read/write position of the file - descriptor. - .TP --.IR "void *buf" -+.BI "void *" buf - This is a pointer to the buffer with the data to be written or the place - where the read data is stored. - .TP --.IR "long u.c.nbytes" -+.BI long " u.c.nbytes" - This element specifies the length of the buffer pointed to by - .IR io_buf . - .TP --.IR "int aio_reqprio" -+.BI int " aio_reqprio" - Is not currently used. - .TP - .B "IO_CMD_PREAD" - Start a read operation. Read from the file at position --.IR "u.c.offset" -+.I u.c.offset - and store the next --.IR "u.c.nbytes" -+.I u.c.nbytes - bytes in the - buffer pointed to by - .IR buf . - .TP - .B "IO_CMD_PWRITE" - Start a write operation. Write --.IR "u.c.nbytes" -+.I u.c.nbytes - bytes starting at --.IR "buf" -+.I buf - into the file starting at position - .IR u.c.offset . - .TP - .B "IO_CMD_NOP" - Do nothing for this control block. This value is useful sometimes when - an array of --.IR "struct iocb" -+.B struct iocb - values contains holes, i.e., some of the - values must not be handled although the whole array is presented to the --.IR "io_submit" -+.BR io_submit (3) - function. - .TP - .B "IO_CMD_FSYNC" --.TP -+.TQ - .B "IO_CMD_POLL" - This is experimental. - .SH EXAMPLE -diff --git a/man/io_cancel.3 b/man/io_cancel.3 -index 62272c7..25dfec4 100644 ---- a/man/io_cancel.3 -+++ b/man/io_cancel.3 -@@ -9,7 +9,7 @@ io_cancel \- Cancel io requests - .B #include - .sp - .br --.BI "int io_cancel(io_context_t ctx, struct iocb *iocb)" -+.BI "int io_cancel(io_context_t " ctx ", struct iocb *" iocb ");" - .br - .sp - struct iocb { -@@ -21,8 +21,11 @@ struct iocb { - }; - .fi - .SH DESCRIPTION --Attempts to cancel an iocb previously passed to io_submit. If --the operation is successfully cancelled, the resulting event is -+Attempts to cancel an -+.I iocb -+previously passed to -+.BR io_submit (3). -+If the operation is successfully cancelled, the resulting event is - copied into the memory pointed to by result without being placed - into the completion queue. - .PP -@@ -33,19 +36,23 @@ have to be overwritten soon. As an example, assume an application, which - writes data in files in a situation where new incoming data would have - to be written in a file which will be updated by an enqueued request. - .SH "RETURN VALUES" --0 is returned on success, otherwise returns errno. -+\fI0\fP is returned on success, otherwise returns \fIerrno\fP. - .SH ERRORS - .TP - .B EFAULT - If any of the data structures pointed to are invalid. - .TP - .B EINVAL --If aio_context specified by ctx_id is --invalid. -+If -+.I aio_context -+specified by -+.I ctx_id -+is invalid. - .TP - .B EAGAIN --If the iocb specified was not --cancelled. -+If the -+.I iocb -+specified was not cancelled. - .TP - .B ENOSYS - If not implemented. -diff --git a/man/io_fsync.3 b/man/io_fsync.3 -index 6938f6b..ec3ab0a 100644 ---- a/man/io_fsync.3 -+++ b/man/io_fsync.3 -@@ -15,7 +15,7 @@ io_fsync \- Synchronize a file's complete in-core state with that on disk - .B #include - .sp - .br --.BI "int io_fsync(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd)" -+.BI "int io_fsync(io_context_t " ctx ", struct iocb *" iocb ", io_callback_t " cb ", int " fd ");" - .sp - struct iocb { - void *data; -@@ -40,7 +40,7 @@ Calling this function forces all I/O operations operating queued at the - time of the function call operating on the file descriptor - .IR "iocb->io_fildes" - into the synchronized I/O completion state. The --.IR "io_fsync" -+.BR io_fsync () - function returns - immediately but the notification through the method described in - .IR "io_callback" -@@ -49,7 +49,10 @@ file descriptor have terminated and the file is synchronized. This also - means that requests for this very same file descriptor which are queued - after the synchronization request are not affected. - .SH "RETURN VALUES" --Returns 0, otherwise returns errno. -+Returns -+.BR 0 , -+otherwise returns -+.IR errno . - .SH ERRORS - .TP - .B EFAULT -diff --git a/man/io_getevents.3 b/man/io_getevents.3 -index fd67929..623752c 100644 ---- a/man/io_getevents.3 -+++ b/man/io_getevents.3 -@@ -42,19 +42,25 @@ struct io_event { - unsigned PADDED(res2, __pad4); - }; - .sp --.BI "int io_getevents(io_context_t " ctx ", long " nr ", struct io_event *" events "[], struct timespec *" timeout ");" --.BI "int io_pgetevents(io_context_t " ctx ", long " nr ", struct io_event *" events "[], struct timespec *" timeout ", sigset_t *" sigmask ");" -+.BI "int io_getevents(io_context_t " ctx ", long " nr ", struct io_event *" events "[], struct timespec *" timeout ");" -+.BI "int io_pgetevents(io_context_t " ctx ", long " nr ", struct io_event *" events "[], struct timespec *" timeout ", sigset_t *" sigmask ");" - .fi - .SH DESCRIPTION --Attempts to read up to nr events from --the completion queue for the aio_context specified by ctx. -+Attempts to read up to -+.I nr -+events from the completion queue for the aio_context specified by -+.IR ctx . - .SH "RETURN VALUES" - May return --0 if no events are available and the timeout specified --by when has elapsed, where when == NULL specifies an infinite -+.B 0 -+if no events are available and the timeout specified -+by when has elapsed, where -+.I when -+== NULL specifies an infinite - timeout. Note that the timeout pointed to by when is relative and --will be updated if not NULL and the operation blocks. Will fail --with ENOSYS if not implemented. -+will be updated if not NULL and the operation blocks. Will fail with -+.B ENOSYS -+if not implemented. - .SS io_pgetevents() - The relationship between - .BR io_getevents () -@@ -110,8 +116,15 @@ behaves the same as - .SH ERRORS - .TP - .B EINVAL --If ctx_id is invalid, if min_nr is out of range, --if nr is out of range, if when is out of range. -+If -+.I ctx_id -+is invalid, if -+.I min_nr -+is out of range, if -+.I nr -+is out of range, if -+.I when -+is out of range. - .TP - .B EFAULT - If any of the memory specified to is invalid. -diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3 -index 7b6dd4b..61e8850 100644 ---- a/man/io_prep_fsync.3 -+++ b/man/io_prep_fsync.3 -@@ -16,7 +16,7 @@ io_prep_fsync \- Synchronize a file's complete in-core state with that on disk - .B #include - .br - .sp --.BI "static inline void io_prep_fsync(struct iocb *iocb, int fd)" -+.BI "static inline void io_prep_fsync(struct iocb *" iocb ", int " fd ");" - .sp - struct iocb { - void *data; -@@ -28,47 +28,72 @@ struct iocb { - .sp - .fi - .SH DESCRIPTION --This is an inline convenience function for setting up an iocbv for a FSYNC request. --.br -+This is an inline convenience function for setting up an -+.I iocbv -+for a -+.B FSYNC -+request. -+. -+.PP - The file for which --.TP -+.nf - .IR "iocb->aio_fildes = fd" -+.fi - is a descriptor is set up with - the command --.TP --.IR "iocb->aio_lio_opcode = IO_CMD_FSYNC: -+.nf -+.IR "iocb->aio_lio_opcode = IO_CMD_FSYNC" -+.fi - . - .PP --The io_prep_fsync() function shall set up an IO_CMD_FSYNC operation --to asynchronously force all I/O -+The -+.BR io_prep_fsync () -+function shall set up an -+.B IO_CMD_FSYNC -+operation to asynchronously force all I/O - operations associated with the file indicated by the file --descriptor aio_fildes member of the iocb structure referenced by -+descriptor -+.I aio_fildes -+member of the -+.I iocb -+structure referenced by - the iocb argument and queued at the time of the call to --io_submit() to the synchronized I/O completion state. The function -+.BR io_submit () -+to the synchronized I/O completion state. The function - call shall return when the synchronization request has been - initiated or queued to the file or device (even when the data - cannot be synchronized immediately). - - All currently queued I/O operations shall be completed as if by a call --to fsync(); that is, as defined for synchronized I/O file -+to -+.BR fsync (2); -+that is, as defined for synchronized I/O file - integrity completion. If the --operation queued by io_prep_fsync() fails, then, as for fsync(), -+operation queued by -+.BR io_prep_fsync () -+fails, then, as for -+.BR fsync (2), - outstanding I/O operations are not guaranteed to have - been completed. - --If io_prep_fsync() succeeds, then it is only the I/O that was queued --at the time of the call to io_submit() that is guaranteed to be -+If -+.BR io_prep_fsync () -+succeeds, then it is only the I/O that was queued -+at the time of the call to -+.BR io_submit (3) -+that is guaranteed to be - forced to the relevant completion state. The completion of - subsequent I/O on the file descriptor is not guaranteed to be - completed in a synchronized fashion. - .PP - This function returns immediately. To schedule the operation, the - function --.IR io_submit -+.BR io_submit (3) - must be called. - .PP --Simultaneous asynchronous operations using the same iocb produce --undefined results. -+Simultaneous asynchronous operations using the same -+.I iocb -+produce undefined results. - .SH "RETURN VALUES" - None. - .SH ERRORS -diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3 -index a0508d7..72463f7 100644 ---- a/man/io_prep_pread.3 -+++ b/man/io_prep_pread.3 -@@ -19,7 +19,7 @@ io_prep_pread \- Set up asynchronous read - .B #include - .br - .sp --.BI "inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) -+.BI "inline void io_prep_pread(struct iocb *" iocb ", int " fd ", void *" buf ", size_t " count ", long long " offset ");" - . - .sp - struct iocb { -@@ -31,32 +31,27 @@ struct iocb { - }; - .fi - .SH DESCRIPTION --.IR io_prep_pread -+.BR io_prep_pread () - is an inline convenience function designed to facilitate the initialization of - the iocb for an asynchronous read operation. - - The first --.TP --.IR "iocb->u.c.nbytes = count" -+.I iocb->u.c.nbytes = count - bytes of the file for which --.TP --.IR "iocb->aio_fildes = fd" -+.I iocb->aio_fildes = fd - is a descriptor are written to the buffer - starting at --.TP - .IR "iocb->u.c.buf = buf" . --.br - Reading starts at the absolute position --.TP --.IR "ioc->u.c.offset = offset" -+.I ioc->u.c.offset = offset - in the file. - .PP - This function returns immediately. To schedule the operation, the - function --.IR io_submit -+.BR io_submit (3) - must be called. - .PP --Simultaneous asynchronous operations using the same iocb produce -+Simultaneous asynchronous operations using the same \fIiocb\fP produce - undefined results. - .SH "RETURN VALUES" - None. -diff --git a/man/io_prep_pwrite.3 b/man/io_prep_pwrite.3 -index 8ce96ce..f41d4f5 100644 ---- a/man/io_prep_pwrite.3 -+++ b/man/io_prep_pwrite.3 -@@ -19,8 +19,8 @@ io_prep_pwrite \- Set up iocb for asynchronous writes - .B #include - .br - .sp --.BI "inline void io_prep_pwrite(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) --" -+.BI "inline void io_prep_pwrite(struct iocb *" iocb ", int " fd ", void *" buf ", size_t " count ", long long " offset ");" -+. - .sp - struct iocb { - void *data; -@@ -31,27 +31,23 @@ struct iocb { - }; - .fi - .SH DESCRIPTION --io_prep_write is a convenience function for setting up parallel writes. -+.BR io_prep_write () -+is a convenience function for setting up parallel writes. - - The first --.TP - .IR "iocb->u.c.nbytes = count" - bytes of the file for which --.TP - .IR "iocb->aio_fildes = fd" - is a descriptor are written from the buffer - starting at --.TP - .IR "iocb->u.c.buf = buf" . --.br - Writing starts at the absolute position --.TP - .IR "ioc->u.c.offset = offset" - in the file. - .PP - This function returns immediately. To schedule the operation, the - function --.IR io_submit -+.BR io_submit (3) - must be called. - .PP - Simultaneous asynchronous operations using the same iocb produce -diff --git a/man/io_queue_init.3 b/man/io_queue_init.3 -index b09da50..33c907f 100644 ---- a/man/io_queue_init.3 -+++ b/man/io_queue_init.3 -@@ -10,25 +10,31 @@ io_queue_init \- Initialize asynchronous io state machine - .B #include - .br - .sp --.BI "int io_queue_init(int maxevents, io_context_t *ctx );" -+.BI "int io_queue_init(int " maxevents ", io_context_t *" ctx ");" - .sp - .fi - .SH DESCRIPTION --.B io_queue_init --Attempts to create an aio context capable of receiving at least --.IR maxevents -+.BR io_queue_init () -+attempts to create an aio context capable of receiving at least -+.I maxevents - events. --.IR ctx -+.I ctx - must point to an aio context that already exists and must be initialized - to --.IR 0 -+.B 0 - before the call. --If the operation is successful, *cxtp is filled with the resulting handle. -+If the operation is successful, -+.I *cxtp -+is filled with the resulting handle. - .SH "RETURN VALUES" - On success, --.B io_queue_init --returns 0. Otherwise, -error is return, where --error is one of the Exxx values defined in the Errors section. -+.BR io_queue_init () -+returns -+.BR 0 . -+Otherwise, -error is return, where -+error is one of the Exxx values defined in the -+.B ERRORS -+section. - .SH ERRORS - .TP - .B EFAULT -@@ -37,7 +43,9 @@ referenced data outside of the program's accessible address space. - .TP - .B EINVAL - .I maxevents --is <= 0 or -+is <= -+.B 0 -+or - .IR ctx - is an invalid memory location. - .TP -@@ -46,7 +54,9 @@ Not implemented. - .TP - .B EAGAIN - .IR "maxevents > max_aio_reqs" --where max_aio_reqs is a tunable value. -+where -+.I max_aio_reqs -+is a tunable value. - .SH "SEE ALSO" - .BR io (3), - .BR io_cancel (3), -diff --git a/man/io_queue_release.3 b/man/io_queue_release.3 -index d6d5def..879d894 100644 ---- a/man/io_queue_release.3 -+++ b/man/io_queue_release.3 -@@ -8,7 +8,7 @@ io_queue_release \- Release the context associated with the userspace handle - .B #include - .br - .sp --.BI "int io_queue_release(io_context_t ctx)" -+.BI "int io_queue_release(io_context_t " ctx ");" - .sp - .SH DESCRIPTION - .B io_queue_release -@@ -17,16 +17,21 @@ AIOs and block on completion. - . - .SH "RETURN VALUES" - On success, --.B io_queue_release --returns 0. Otherwise, -error is return, where -+.BR io_queue_release () -+returns -+.BR 0 . -+Otherwise, -error is return, where - error is one of the Exxx values defined in the Errors section. - .SH ERRORS - .TP - .B EINVAL - .I ctx --refers to an uninitialized aio context, the iocb pointed to by -+refers to an uninitialized aio context, the -+.I iocb -+pointed to by - .I iocbs --contains an improperly initialized iocb, -+contains an improperly initialized -+.IR iocb . - .TP - .B ENOSYS - Not implemented. -@@ -44,4 +49,3 @@ Not implemented. - .BR io_set_callback (3), - .BR io_submit (3), - .BR errno (3). -- -diff --git a/man/io_queue_run.3 b/man/io_queue_run.3 -index ff6eb78..05e188a 100644 ---- a/man/io_queue_run.3 -+++ b/man/io_queue_run.3 -@@ -9,17 +9,19 @@ io_queue_run \- Handle completed io requests - .B #include - .br - .sp --.BI "int io_queue_run(io_context_t ctx );" -+.BI "int io_queue_run(io_context_t " ctx ");" - .sp - .fi - .SH DESCRIPTION --.B io_queue_run --Attempts to read all the events from --the completion queue for the aio_context specified by ctx_id. -+.BR io_queue_run () -+attempts to read all the events from -+the completion queue for the aio_context specified by -+.IR ctx_id . - .SH "RETURN VALUES" - May return --0 if no events are available. --Will fail with -ENOSYS if not implemented. -+.B 0 -+if no events are available. -+Will fail with -\fBENOSYS\fP if not implemented. - .SH ERRORS - .TP - .B EFAULT -@@ -28,7 +30,9 @@ referenced data outside of the program's accessible address space. - .TP - .B EINVAL - .I ctx --refers to an uninitialized aio context, the iocb pointed to by -+refers to an uninitialized aio context, the -+.I iocb -+pointed to by - .I iocbs - contains an improperly initialized iocb. - .TP -diff --git a/man/io_queue_wait.3 b/man/io_queue_wait.3 -index dedfcdd..96b61f7 100644 ---- a/man/io_queue_wait.3 -+++ b/man/io_queue_wait.3 -@@ -9,22 +9,27 @@ io_queue_wait \- Wait for io requests to complete - .B #include - .br - .sp --.BI "int io_queue_wait(io_context_t ctx, const struct timespec *timeout);" -+.BI "int io_queue_wait(io_context_t " ctx ", const struct timespec *" timeout ");" - .fi - .SH DESCRIPTION --Attempts to read an event from --the completion queue for the aio_context specified by ctx_id. -+.BR io_queue_wait () -+attempts to read an event from -+the completion queue for the aio_context specified by -+.IR ctx_id . - .SH "RETURN VALUES" - May return --0 if no events are available and the timeout specified -+.B 0 -+if no events are available and the timeout specified - by when has elapsed, where when == NULL specifies an infinite --timeout. Note that the timeout pointed to by when is relative and -+\fItimeout\fP. Note that the \fItimeout\fP pointed to by when is relative and - will be updated if not NULL and the operation blocks. Will fail --with -ENOSYS if not implemented. -+with -\fBENOSYS\fP if not implemented. - .SH "RETURN VALUES" - On success, --.B io_queue_wait --returns 0. Otherwise, -error is return, where -+.BR io_queue_wait () -+returns -+.BR 0 . -+Otherwise, -error is return, where - error is one of the Exxx values defined in the Errors section. - .SH ERRORS - .TP -@@ -34,7 +39,9 @@ referenced data outside of the program's accessible address space. - .TP - .B EINVAL - .I ctx --refers to an uninitialized aio context, the iocb pointed to by -+refers to an uninitialized aio context, the -+.I iocb -+pointed to by - .I iocbs - contains an improperly initialized iocb. - .TP -diff --git a/man/io_set_callback.3 b/man/io_set_callback.3 -index e8d8e60..26a0cd0 100644 ---- a/man/io_set_callback.3 -+++ b/man/io_set_callback.3 -@@ -10,7 +10,7 @@ io_set_callback \- Set up io completion callback function - .B #include - .br - .sp --.BI "static inline void io_set_callback(struct iocb *iocb, io_callback_t cb)" -+.BI "static inline void io_set_callback(struct iocb *" iocb ", io_callback_t " cb ");" - .sp - struct iocb { - void *data; -@@ -25,7 +25,8 @@ typedef void (*io_callback_t)(io_context_t ctx, struct iocb *iocb, long res, lon - .fi - .SH DESCRIPTION - The callback is not done if the caller uses raw events from --io_getevents, only with the library helpers. -+.BR io_getevents (3), -+only with the library helpers. - .SH "RETURN VALUES" - None. - .SH ERRORS -diff --git a/man/io_submit.3 b/man/io_submit.3 -index 953246c..587045b 100644 ---- a/man/io_submit.3 -+++ b/man/io_submit.3 -@@ -32,21 +32,21 @@ struct iocb { - }; - .fi - .SH DESCRIPTION --.B io_submit -+.BR io_submit () - submits - .I nr - iocbs for processing for a given io context ctx. - - The --.IR "io_submit" -+.BR io_submit () - function can be used to enqueue an arbitrary - number of read and write requests at one time. The requests can all be - meant for the same file, all for different files or every solution in - between. - --.IR "io_submit" -+.BR io_submit () - gets the --.IR "nr" -+.I nr - requests from the array pointed to - by - .IR "iocbs" . -@@ -75,10 +75,10 @@ in which case this element of - .IR "iocbs" - is simply ignored. This - ``operation'' is useful in situations where one has a fixed array of --.IR "struct iocb" -+.B struct iocb - elements from which only a few need to be handled at - a time. Another situation is where the --.IR "io_submit" -+.BR io_submit (3) - call was - canceled before all requests are processed and the remaining requests have to be reissued. - -@@ -86,15 +86,15 @@ The other members of each element of the array pointed to by - .IR "iocbs" - must have values suitable for the operation as described in - the documentation for --.IR "io_prep_pread" -+.BR io_prep_pread (3) - and --.IR "io_prep_pwrite" -+.BR io_prep_pwrite (3) - above. - - The function returns immediately after - having enqueued all the requests. - On success, --.B io_submit -+.BR io_submit () - returns the number of iocbs submitted successfully. Otherwise, -error is return, where - error is one of the Exxx values defined in the Errors section. - .PP -@@ -115,10 +115,14 @@ refers to an uninitialized aio context, the iocb pointed to by - contains an improperly initialized iocb, - .TP - .B EBADF --The iocb contains a file descriptor that does not exist. -+The -+.I iocb -+contains a file descriptor that does not exist. - .TP - .B EINVAL --The file specified in the iocb does not support the given io operation. -+The file specified in the -+.I iocb -+does not support the given io operation. - .SH "SEE ALSO" - .BR io (3), - .BR io_cancel (3), --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0012-man-Fix-title-header.patch libaio-0.3.112/debian/patches/0012-man-Fix-title-header.patch --- libaio-0.3.112/debian/patches/0012-man-Fix-title-header.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0012-man-Fix-title-header.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,180 @@ +From ed25b0e63b2bedecc9c181a620422627f27064ef Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Tue, 23 Jul 2019 01:28:10 +0200 +Subject: [PATCH libaio 12/26] man: Fix title header + +- Update year. +- Balance double quotes. +- Remove version from source argument as recommended in man-pages(7). +- Fix all sections numbers to 3. + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + man/io.3 | 2 +- + man/io_cancel.3 | 2 +- + man/io_fsync.3 | 2 +- + man/io_getevents.3 | 2 +- + man/io_prep_fsync.3 | 2 +- + man/io_prep_pread.3 | 2 +- + man/io_prep_pwrite.3 | 2 +- + man/io_queue_init.3 | 2 +- + man/io_queue_release.3 | 2 +- + man/io_queue_run.3 | 2 +- + man/io_queue_wait.3 | 2 +- + man/io_set_callback.3 | 2 +- + man/io_submit.3 | 2 +- + 13 files changed, 13 insertions(+), 13 deletions(-) + +diff --git a/man/io.3 b/man/io.3 +index bc529ea..922fbca 100644 +--- a/man/io.3 ++++ b/man/io.3 +@@ -1,4 +1,4 @@ +-.TH io 3 2002-09-12 "Linux 2.4" Linux IO" ++.TH io 3 2019-07-23 "Linux" "Linux AIO" + .SH NAME + io \- Asynchronous IO + .SH SYNOPSIS +diff --git a/man/io_cancel.3 b/man/io_cancel.3 +index 261a407..a4683be 100644 +--- a/man/io_cancel.3 ++++ b/man/io_cancel.3 +@@ -1,4 +1,4 @@ +-.TH io_cancel 2 2002-09-03 "Linux 2.4" "Linux AIO" ++.TH io_cancel 3 2019-07-23 "Linux" "Linux AIO" + .SH NAME + io_cancel \- Cancel io requests + .SH SYNOPSIS +diff --git a/man/io_fsync.3 b/man/io_fsync.3 +index 5400d41..bc6778a 100644 +--- a/man/io_fsync.3 ++++ b/man/io_fsync.3 +@@ -4,7 +4,7 @@ + .\" io_set_callback(iocb, cb); + .\" return io_submit(ctx, 1, &iocb); + .\" } +-.TH io_fsync 3 2002-09-12 "Linux 2.4" Linux AIO" ++.TH io_fsync 3 2019-07-23 "Linux" "Linux AIO" + .SH NAME + io_fsync \- Synchronize a file's complete in-core state with that on disk + .SH SYNOPSIS +diff --git a/man/io_getevents.3 b/man/io_getevents.3 +index 95fa86e..05b2507 100644 +--- a/man/io_getevents.3 ++++ b/man/io_getevents.3 +@@ -16,7 +16,7 @@ + .\" struct io_event *events, + .\" struct timespec *timeout) + .\" +-.TH io_getevents 2 2002-09-03 "Linux 2.4" "Linux AIO" ++.TH io_getevents 3 2019-07-23 "Linux" "Linux AIO" + .SH NAME + io_getevents, aio_pgetevents \- Read resulting events from io requests + .SH SYNOPSIS +diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3 +index 0397172..bc0c43b 100644 +--- a/man/io_prep_fsync.3 ++++ b/man/io_prep_fsync.3 +@@ -5,7 +5,7 @@ + .\" iocb->aio_lio_opcode = IO_CMD_FSYNC; + .\" iocb->aio_reqprio = 0; + .\" } +-.TH io_prep_fsync 3 2002-09-12 "Linux 2.4" Linux AIO" ++.TH io_prep_fsync 3 2019-07-23 "Linux" "Linux AIO" + .SH NAME + io_prep_fsync \- Synchronize a file's complete in-core state with that on disk + .SH SYNOPSIS +diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3 +index 3c28f61..e981e41 100644 +--- a/man/io_prep_pread.3 ++++ b/man/io_prep_pread.3 +@@ -8,7 +8,7 @@ + .\" iocb->u.c.nbytes = count; + .\" iocb->u.c.offset = offset; + .\" } +-.TH io_prep_pread 3 2002-09-12 "Linux 2.4" Linux AIO" ++.TH io_prep_pread 3 2019-07-23 "Linux" "Linux AIO" + .SH NAME + io_prep_pread \- Set up asynchronous read + .SH SYNOPSIS +diff --git a/man/io_prep_pwrite.3 b/man/io_prep_pwrite.3 +index 69479c2..f2837b6 100644 +--- a/man/io_prep_pwrite.3 ++++ b/man/io_prep_pwrite.3 +@@ -8,7 +8,7 @@ + .\" iocb->u.c.nbytes = count; + .\" iocb->u.c.offset = offset; + .\" } +-.TH io_prep_pwrite 3 2002-09-12 "Linux 2.4" Linux AIO" ++.TH io_prep_pwrite 3 2019-07-23 "Linux" "Linux AIO" + .SH NAME + io_prep_pwrite \- Set up iocb for asynchronous writes + .SH SYNOPSIS +diff --git a/man/io_queue_init.3 b/man/io_queue_init.3 +index 9c04b3f..d8753a7 100644 +--- a/man/io_queue_init.3 ++++ b/man/io_queue_init.3 +@@ -1,4 +1,4 @@ +-.TH io_queue_init 2 2002-09-03 "Linux 2.4" "Linux AIO" ++.TH io_queue_init 3 2019-07-23 "Linux" "Linux AIO" + .SH NAME + io_queue_init \- Initialize asynchronous io state machine + +diff --git a/man/io_queue_release.3 b/man/io_queue_release.3 +index 5c9ded1..392a478 100644 +--- a/man/io_queue_release.3 ++++ b/man/io_queue_release.3 +@@ -1,4 +1,4 @@ +-.TH io_queue_release 2 2002-09-03 "Linux 2.4" "Linux AIO" ++.TH io_queue_release 3 2019-07-23 "Linux" "Linux AIO" + .SH NAME + io_queue_release \- Release the context associated with the userspace handle + .SH SYNOPSIS +diff --git a/man/io_queue_run.3 b/man/io_queue_run.3 +index 8e0691c..dc54acd 100644 +--- a/man/io_queue_run.3 ++++ b/man/io_queue_run.3 +@@ -1,4 +1,4 @@ +-.TH io_queue_run 2 2002-09-03 "Linux 2.4" "Linux AIO" ++.TH io_queue_run 3 2019-07-23 "Linux" "Linux AIO" + .SH NAME + io_queue_run \- Handle completed io requests + .SH SYNOPSIS +diff --git a/man/io_queue_wait.3 b/man/io_queue_wait.3 +index 0cf0497..356c3b2 100644 +--- a/man/io_queue_wait.3 ++++ b/man/io_queue_wait.3 +@@ -1,4 +1,4 @@ +-.TH io_queue_wait 2 2002-09-03 "Linux 2.4" "Linux AIO" ++.TH io_queue_wait 3 2019-07-23 "Linux" "Linux AIO" + .SH NAME + io_queue_wait \- Wait for io requests to complete + .SH SYNOPSIS +diff --git a/man/io_set_callback.3 b/man/io_set_callback.3 +index 3599e8c..25b9a7f 100644 +--- a/man/io_set_callback.3 ++++ b/man/io_set_callback.3 +@@ -1,5 +1,5 @@ + .\"static inline void io_set_callback(struct iocb *iocb, io_callback_t cb) +-.TH io_set_callback 3 2002-09-12 "Linux 2.4" Linux AIO" ++.TH io_set_callback 3 2019-07-23 "Linux" "Linux AIO" + .SH NAME + io_set_callback \- Set up io completion callback function + .SH SYNOPSIS +diff --git a/man/io_submit.3 b/man/io_submit.3 +index 3ae8721..01c25cd 100644 +--- a/man/io_submit.3 ++++ b/man/io_submit.3 +@@ -10,7 +10,7 @@ + .\" * are available to queue any iocbs. Will return 0 if nr is 0. Will + .\" * fail with -ENOSYS if not implemented. + .\" */ +-.TH io_submit 2 2002-09-02 "Linux 2.4" "Linux AIO" ++.TH io_submit 3 2019-07-23 "Linux" "Linux AIO" + .SH NAME + io_submit \- Submit io requests + .SH SYNOPSIS +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0013-man-Fix-markup.patch libaio-0.3.112/debian/patches/0013-man-Fix-markup.patch --- libaio-0.3.112/debian/patches/0013-man-Fix-markup.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0013-man-Fix-markup.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,799 @@ +From a311701ea7eebff003e88694a391d810485f36e0 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:18:11 +0200 +Subject: [PATCH libaio 13/26] man: Fix markup + +- Remove unnecessary macro argument quoting. +- Variables, pathnames in italics. +- Keywords in bold. +- Man page references in bold, followed by the man page number. +- Fix TP/TQ macro usage. + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + man/io.3 | 38 ++++++++++++++------------- + man/io_cancel.3 | 23 ++++++++++------ + man/io_fsync.3 | 9 ++++--- + man/io_getevents.3 | 33 ++++++++++++++++------- + man/io_prep_fsync.3 | 59 ++++++++++++++++++++++++++++++------------ + man/io_prep_pread.3 | 19 +++++--------- + man/io_prep_pwrite.3 | 14 ++++------ + man/io_queue_init.3 | 34 +++++++++++++++--------- + man/io_queue_release.3 | 16 +++++++----- + man/io_queue_run.3 | 18 ++++++++----- + man/io_queue_wait.3 | 25 +++++++++++------- + man/io_set_callback.3 | 5 ++-- + man/io_submit.3 | 26 +++++++++++-------- + 13 files changed, 195 insertions(+), 124 deletions(-) + +diff --git a/man/io.3 b/man/io.3 +index 922fbca..f40da41 100644 +--- a/man/io.3 ++++ b/man/io.3 +@@ -10,16 +10,18 @@ io \- Asynchronous IO + .sp + .fi + .SH DESCRIPTION +-The libaio library defines a new set of I/O operations which can ++The ++.B libaio ++library defines a new set of I/O operations which can + significantly reduce the time an application spends waiting at I/O. The + new functions allow a program to initiate one or more I/O operations and + then immediately resume normal work while the I/O operations are + executed in parallel. + + These functions are part of the library with realtime functions named +-.IR libaio . ++.BR libaio . + They are not actually part of the +-.IR "libc" ++.B libc + binary. + The implementation of these functions can be done using support in the + kernel. +@@ -27,9 +29,9 @@ kernel. + All IO operations operate on files which were opened previously. There + might be arbitrarily many operations running for one file. The + asynchronous I/O operations are controlled using a data structure named +-.IR "struct iocb" ++.B struct iocb + It is defined in +-.IR "libaio.h" ++.I libaio.h + as follows. + + .nf +@@ -74,7 +76,7 @@ struct iocb { + + .fi + .TP +-.IR "int aio_fildes" ++.BI int " aio_fildes" + This element specifies the file descriptor to be used for the + operation. It must be a legal descriptor, otherwise the operation will + fail. +@@ -82,55 +84,55 @@ fail. + The device on which the file is opened must allow the seek operation. + I.e., it is not possible to use any of the IO operations on devices + like terminals where an +-.IR "lseek" ++.BR lseek (2) + call would lead to an error. + .TP +-.IR "long u.c.offset" ++.BI long " u.c.offset" + This element specifies the offset in the file at which the operation (input + or output) is performed. Since the operations are carried out in arbitrary + order and more than one operation for one file descriptor can be + started, one cannot expect a current read/write position of the file + descriptor. + .TP +-.IR "void *buf" ++.BI "void *" buf + This is a pointer to the buffer with the data to be written or the place + where the read data is stored. + .TP +-.IR "long u.c.nbytes" ++.BI long " u.c.nbytes" + This element specifies the length of the buffer pointed to by + .IR io_buf . + .TP +-.IR "int aio_reqprio" ++.BI int " aio_reqprio" + Is not currently used. + .TP + .B "IO_CMD_PREAD" + Start a read operation. Read from the file at position +-.IR "u.c.offset" ++.I u.c.offset + and store the next +-.IR "u.c.nbytes" ++.I u.c.nbytes + bytes in the + buffer pointed to by + .IR buf . + .TP + .B "IO_CMD_PWRITE" + Start a write operation. Write +-.IR "u.c.nbytes" ++.I u.c.nbytes + bytes starting at +-.IR "buf" ++.I buf + into the file starting at position + .IR u.c.offset . + .TP + .B "IO_CMD_NOP" + Do nothing for this control block. This value is useful sometimes when + an array of +-.IR "struct iocb" ++.B struct iocb + values contains holes, i.e., some of the + values must not be handled although the whole array is presented to the +-.IR "io_submit" ++.BR io_submit (3) + function. + .TP + .B "IO_CMD_FSYNC" +-.TP ++.TQ + .B "IO_CMD_POLL" + This is experimental. + .SH EXAMPLE +diff --git a/man/io_cancel.3 b/man/io_cancel.3 +index a4683be..3ca629b 100644 +--- a/man/io_cancel.3 ++++ b/man/io_cancel.3 +@@ -9,7 +9,7 @@ io_cancel \- Cancel io requests + .B #include + .sp + .br +-.BI "int io_cancel(io_context_t ctx, struct iocb *iocb)" ++.BI "int io_cancel(io_context_t " ctx ", struct iocb *" iocb ");" + .br + .sp + struct iocb { +@@ -21,8 +21,11 @@ struct iocb { + }; + .fi + .SH DESCRIPTION +-Attempts to cancel an iocb previously passed to io_submit. If +-the operation is successfully cancelled, the resulting event is ++Attempts to cancel an ++.I iocb ++previously passed to ++.BR io_submit (3). ++If the operation is successfully cancelled, the resulting event is + copied into the memory pointed to by result without being placed + into the completion queue. + .PP +@@ -33,19 +36,23 @@ have to be overwritten soon. As an example, assume an application, which + writes data in files in a situation where new incoming data would have + to be written in a file which will be updated by an enqueued request. + .SH "RETURN VALUES" +-0 is returned on success, otherwise returns errno. ++\fI0\fP is returned on success, otherwise returns \fIerrno\fP. + .SH ERRORS + .TP + .B EFAULT + If any of the data structures pointed to are invalid. + .TP + .B EINVAL +-If aio_context specified by ctx_id is +-invalid. ++If ++.I aio_context ++specified by ++.I ctx_id ++is invalid. + .TP + .B EAGAIN +-If the iocb specified was not +-cancelled. ++If the ++.I iocb ++specified was not cancelled. + .TP + .B ENOSYS + If not implemented. +diff --git a/man/io_fsync.3 b/man/io_fsync.3 +index bc6778a..06538c4 100644 +--- a/man/io_fsync.3 ++++ b/man/io_fsync.3 +@@ -15,7 +15,7 @@ io_fsync \- Synchronize a file's complete in-core state with that on disk + .B #include + .sp + .br +-.BI "int io_fsync(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd)" ++.BI "int io_fsync(io_context_t " ctx ", struct iocb *" iocb ", io_callback_t " cb ", int " fd ");" + .sp + struct iocb { + void *data; +@@ -40,7 +40,7 @@ Calling this function forces all I/O operations operating queued at the + time of the function call operating on the file descriptor + .IR "iocb->io_fildes" + into the synchronized I/O completion state. The +-.IR "io_fsync" ++.BR io_fsync () + function returns + immediately but the notification through the method described in + .IR "io_callback" +@@ -49,7 +49,10 @@ file descriptor have terminated and the file is synchronized. This also + means that requests for this very same file descriptor which are queued + after the synchronization request are not affected. + .SH "RETURN VALUES" +-Returns 0, otherwise returns errno. ++Returns ++.BR 0 , ++otherwise returns ++.IR errno . + .SH ERRORS + .TP + .B EFAULT +diff --git a/man/io_getevents.3 b/man/io_getevents.3 +index 05b2507..6fbcc24 100644 +--- a/man/io_getevents.3 ++++ b/man/io_getevents.3 +@@ -42,19 +42,25 @@ struct io_event { + unsigned PADDED(res2, __pad4); + }; + .sp +-.BI "int io_getevents(io_context_t " ctx ", long " nr ", struct io_event *" events "[], struct timespec *" timeout ");" +-.BI "int io_pgetevents(io_context_t " ctx ", long " nr ", struct io_event *" events "[], struct timespec *" timeout ", sigset_t *" sigmask ");" ++.BI "int io_getevents(io_context_t " ctx ", long " nr ", struct io_event *" events "[], struct timespec *" timeout ");" ++.BI "int io_pgetevents(io_context_t " ctx ", long " nr ", struct io_event *" events "[], struct timespec *" timeout ", sigset_t *" sigmask ");" + .fi + .SH DESCRIPTION +-Attempts to read up to nr events from +-the completion queue for the aio_context specified by ctx. ++Attempts to read up to ++.I nr ++events from the completion queue for the aio_context specified by ++.IR ctx . + .SH "RETURN VALUES" + May return +-0 if no events are available and the timeout specified +-by when has elapsed, where when == NULL specifies an infinite ++.B 0 ++if no events are available and the timeout specified ++by when has elapsed, where ++.I when ++== NULL specifies an infinite + timeout. Note that the timeout pointed to by when is relative and +-will be updated if not NULL and the operation blocks. Will fail +-with ENOSYS if not implemented. ++will be updated if not NULL and the operation blocks. Will fail with ++.B ENOSYS ++if not implemented. + .SS io_pgetevents() + The relationship between + .BR io_getevents () +@@ -110,8 +116,15 @@ behaves the same as + .SH ERRORS + .TP + .B EINVAL +-If ctx_id is invalid, if min_nr is out of range, +-if nr is out of range, if when is out of range. ++If ++.I ctx_id ++is invalid, if ++.I min_nr ++is out of range, if ++.I nr ++is out of range, if ++.I when ++is out of range. + .TP + .B EFAULT + If any of the memory specified to is invalid. +diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3 +index bc0c43b..d332709 100644 +--- a/man/io_prep_fsync.3 ++++ b/man/io_prep_fsync.3 +@@ -16,7 +16,7 @@ io_prep_fsync \- Synchronize a file's complete in-core state with that on disk + .B #include + .br + .sp +-.BI "static inline void io_prep_fsync(struct iocb *iocb, int fd)" ++.BI "static inline void io_prep_fsync(struct iocb *" iocb ", int " fd ");" + .sp + struct iocb { + void *data; +@@ -28,47 +28,72 @@ struct iocb { + .sp + .fi + .SH DESCRIPTION +-This is an inline convenience function for setting up an iocbv for a FSYNC request. +-.br ++This is an inline convenience function for setting up an ++.I iocbv ++for a ++.B FSYNC ++request. ++. ++.PP + The file for which +-.TP ++.nf + .IR "iocb->aio_fildes = fd" ++.fi + is a descriptor is set up with + the command +-.TP +-.IR "iocb->aio_lio_opcode = IO_CMD_FSYNC: ++.nf ++.IR "iocb->aio_lio_opcode = IO_CMD_FSYNC" ++.fi + . + .PP +-The io_prep_fsync() function shall set up an IO_CMD_FSYNC operation +-to asynchronously force all I/O ++The ++.BR io_prep_fsync () ++function shall set up an ++.B IO_CMD_FSYNC ++operation to asynchronously force all I/O + operations associated with the file indicated by the file +-descriptor aio_fildes member of the iocb structure referenced by ++descriptor ++.I aio_fildes ++member of the ++.I iocb ++structure referenced by + the iocb argument and queued at the time of the call to +-io_submit() to the synchronized I/O completion state. The function ++.BR io_submit () ++to the synchronized I/O completion state. The function + call shall return when the synchronization request has been + initiated or queued to the file or device (even when the data + cannot be synchronized immediately). + + All currently queued I/O operations shall be completed as if by a call +-to fsync(); that is, as defined for synchronized I/O file ++to ++.BR fsync (2); ++that is, as defined for synchronized I/O file + integrity completion. If the +-operation queued by io_prep_fsync() fails, then, as for fsync(), ++operation queued by ++.BR io_prep_fsync () ++fails, then, as for ++.BR fsync (2), + outstanding I/O operations are not guaranteed to have + been completed. + +-If io_prep_fsync() succeeds, then it is only the I/O that was queued +-at the time of the call to io_submit() that is guaranteed to be ++If ++.BR io_prep_fsync () ++succeeds, then it is only the I/O that was queued ++at the time of the call to ++.BR io_submit (3) ++that is guaranteed to be + forced to the relevant completion state. The completion of + subsequent I/O on the file descriptor is not guaranteed to be + completed in a synchronized fashion. + .PP + This function returns immediately. To schedule the operation, the + function +-.IR io_submit ++.BR io_submit (3) + must be called. + .PP +-Simultaneous asynchronous operations using the same iocb produce +-undefined results. ++Simultaneous asynchronous operations using the same ++.I iocb ++produce undefined results. + .SH "RETURN VALUES" + None. + .SH ERRORS +diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3 +index e981e41..e0756a7 100644 +--- a/man/io_prep_pread.3 ++++ b/man/io_prep_pread.3 +@@ -19,7 +19,7 @@ io_prep_pread \- Set up asynchronous read + .B #include + .br + .sp +-.BI "inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) ++.BI "inline void io_prep_pread(struct iocb *" iocb ", int " fd ", void *" buf ", size_t " count ", long long " offset ");" + . + .sp + struct iocb { +@@ -31,32 +31,27 @@ struct iocb { + }; + .fi + .SH DESCRIPTION +-.IR io_prep_pread ++.BR io_prep_pread () + is an inline convenience function designed to facilitate the initialization of + the iocb for an asynchronous read operation. + + The first +-.TP +-.IR "iocb->u.c.nbytes = count" ++.I iocb->u.c.nbytes = count + bytes of the file for which +-.TP +-.IR "iocb->aio_fildes = fd" ++.I iocb->aio_fildes = fd + is a descriptor are written to the buffer + starting at +-.TP + .IR "iocb->u.c.buf = buf" . +-.br + Reading starts at the absolute position +-.TP +-.IR "ioc->u.c.offset = offset" ++.I ioc->u.c.offset = offset + in the file. + .PP + This function returns immediately. To schedule the operation, the + function +-.IR io_submit ++.BR io_submit (3) + must be called. + .PP +-Simultaneous asynchronous operations using the same iocb produce ++Simultaneous asynchronous operations using the same \fIiocb\fP produce + undefined results. + .SH "RETURN VALUES" + None. +diff --git a/man/io_prep_pwrite.3 b/man/io_prep_pwrite.3 +index f2837b6..b3770b4 100644 +--- a/man/io_prep_pwrite.3 ++++ b/man/io_prep_pwrite.3 +@@ -19,8 +19,8 @@ io_prep_pwrite \- Set up iocb for asynchronous writes + .B #include + .br + .sp +-.BI "inline void io_prep_pwrite(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) +-" ++.BI "inline void io_prep_pwrite(struct iocb *" iocb ", int " fd ", void *" buf ", size_t " count ", long long " offset ");" ++. + .sp + struct iocb { + void *data; +@@ -31,27 +31,23 @@ struct iocb { + }; + .fi + .SH DESCRIPTION +-io_prep_write is a convenience function for setting up parallel writes. ++.BR io_prep_write () ++is a convenience function for setting up parallel writes. + + The first +-.TP + .IR "iocb->u.c.nbytes = count" + bytes of the file for which +-.TP + .IR "iocb->aio_fildes = fd" + is a descriptor are written from the buffer + starting at +-.TP + .IR "iocb->u.c.buf = buf" . +-.br + Writing starts at the absolute position +-.TP + .IR "ioc->u.c.offset = offset" + in the file. + .PP + This function returns immediately. To schedule the operation, the + function +-.IR io_submit ++.BR io_submit (3) + must be called. + .PP + Simultaneous asynchronous operations using the same iocb produce +diff --git a/man/io_queue_init.3 b/man/io_queue_init.3 +index d8753a7..661f377 100644 +--- a/man/io_queue_init.3 ++++ b/man/io_queue_init.3 +@@ -10,25 +10,31 @@ io_queue_init \- Initialize asynchronous io state machine + .B #include + .br + .sp +-.BI "int io_queue_init(int maxevents, io_context_t *ctx );" ++.BI "int io_queue_init(int " maxevents ", io_context_t *" ctx ");" + .sp + .fi + .SH DESCRIPTION +-.B io_queue_init +-Attempts to create an aio context capable of receiving at least +-.IR maxevents ++.BR io_queue_init () ++attempts to create an aio context capable of receiving at least ++.I maxevents + events. +-.IR ctx ++.I ctx + must point to an aio context that already exists and must be initialized + to +-.IR 0 ++.B 0 + before the call. +-If the operation is successful, *cxtp is filled with the resulting handle. ++If the operation is successful, ++.I *cxtp ++is filled with the resulting handle. + .SH "RETURN VALUES" + On success, +-.B io_queue_init +-returns 0. Otherwise, -error is return, where +-error is one of the Exxx values defined in the Errors section. ++.BR io_queue_init () ++returns ++.BR 0 . ++Otherwise, -error is return, where ++error is one of the Exxx values defined in the ++.B ERRORS ++section. + .SH ERRORS + .TP + .B EFAULT +@@ -37,7 +43,9 @@ referenced data outside of the program's accessible address space. + .TP + .B EINVAL + .I maxevents +-is <= 0 or ++is <= ++.B 0 ++or + .IR ctx + is an invalid memory location. + .TP +@@ -46,7 +54,9 @@ Not implemented. + .TP + .B EAGAIN + .IR "maxevents > max_aio_reqs" +-where max_aio_reqs is a tunable value. ++where ++.I max_aio_reqs ++is a tunable value. + .SH "SEE ALSO" + .BR io (3), + .BR io_cancel (3), +diff --git a/man/io_queue_release.3 b/man/io_queue_release.3 +index 392a478..7a67141 100644 +--- a/man/io_queue_release.3 ++++ b/man/io_queue_release.3 +@@ -8,7 +8,7 @@ io_queue_release \- Release the context associated with the userspace handle + .B #include + .br + .sp +-.BI "int io_queue_release(io_context_t ctx)" ++.BI "int io_queue_release(io_context_t " ctx ");" + .sp + .SH DESCRIPTION + .B io_queue_release +@@ -17,16 +17,21 @@ AIOs and block on completion. + . + .SH "RETURN VALUES" + On success, +-.B io_queue_release +-returns 0. Otherwise, -error is return, where ++.BR io_queue_release () ++returns ++.BR 0 . ++Otherwise, -error is return, where + error is one of the Exxx values defined in the Errors section. + .SH ERRORS + .TP + .B EINVAL + .I ctx +-refers to an uninitialized aio context, the iocb pointed to by ++refers to an uninitialized aio context, the ++.I iocb ++pointed to by + .I iocbs +-contains an improperly initialized iocb, ++contains an improperly initialized ++.IR iocb . + .TP + .B ENOSYS + Not implemented. +@@ -44,4 +49,3 @@ Not implemented. + .BR io_set_callback (3), + .BR io_submit (3), + .BR errno (3). +- +diff --git a/man/io_queue_run.3 b/man/io_queue_run.3 +index dc54acd..93e322b 100644 +--- a/man/io_queue_run.3 ++++ b/man/io_queue_run.3 +@@ -9,17 +9,19 @@ io_queue_run \- Handle completed io requests + .B #include + .br + .sp +-.BI "int io_queue_run(io_context_t ctx );" ++.BI "int io_queue_run(io_context_t " ctx ");" + .sp + .fi + .SH DESCRIPTION +-.B io_queue_run +-Attempts to read all the events from +-the completion queue for the aio_context specified by ctx_id. ++.BR io_queue_run () ++attempts to read all the events from ++the completion queue for the aio_context specified by ++.IR ctx_id . + .SH "RETURN VALUES" + May return +-0 if no events are available. +-Will fail with -ENOSYS if not implemented. ++.B 0 ++if no events are available. ++Will fail with -\fBENOSYS\fP if not implemented. + .SH ERRORS + .TP + .B EFAULT +@@ -28,7 +30,9 @@ referenced data outside of the program's accessible address space. + .TP + .B EINVAL + .I ctx +-refers to an uninitialized aio context, the iocb pointed to by ++refers to an uninitialized aio context, the ++.I iocb ++pointed to by + .I iocbs + contains an improperly initialized iocb. + .TP +diff --git a/man/io_queue_wait.3 b/man/io_queue_wait.3 +index 356c3b2..ad5e7f4 100644 +--- a/man/io_queue_wait.3 ++++ b/man/io_queue_wait.3 +@@ -9,22 +9,27 @@ io_queue_wait \- Wait for io requests to complete + .B #include + .br + .sp +-.BI "int io_queue_wait(io_context_t ctx, const struct timespec *timeout);" ++.BI "int io_queue_wait(io_context_t " ctx ", const struct timespec *" timeout ");" + .fi + .SH DESCRIPTION +-Attempts to read an event from +-the completion queue for the aio_context specified by ctx_id. ++.BR io_queue_wait () ++attempts to read an event from ++the completion queue for the aio_context specified by ++.IR ctx_id . + .SH "RETURN VALUES" + May return +-0 if no events are available and the timeout specified ++.B 0 ++if no events are available and the timeout specified + by when has elapsed, where when == NULL specifies an infinite +-timeout. Note that the timeout pointed to by when is relative and ++\fItimeout\fP. Note that the \fItimeout\fP pointed to by when is relative and + will be updated if not NULL and the operation blocks. Will fail +-with -ENOSYS if not implemented. ++with -\fBENOSYS\fP if not implemented. + .SH "RETURN VALUES" + On success, +-.B io_queue_wait +-returns 0. Otherwise, -error is return, where ++.BR io_queue_wait () ++returns ++.BR 0 . ++Otherwise, -error is return, where + error is one of the Exxx values defined in the Errors section. + .SH ERRORS + .TP +@@ -34,7 +39,9 @@ referenced data outside of the program's accessible address space. + .TP + .B EINVAL + .I ctx +-refers to an uninitialized aio context, the iocb pointed to by ++refers to an uninitialized aio context, the ++.I iocb ++pointed to by + .I iocbs + contains an improperly initialized iocb. + .TP +diff --git a/man/io_set_callback.3 b/man/io_set_callback.3 +index 25b9a7f..855f4b9 100644 +--- a/man/io_set_callback.3 ++++ b/man/io_set_callback.3 +@@ -10,7 +10,7 @@ io_set_callback \- Set up io completion callback function + .B #include + .br + .sp +-.BI "static inline void io_set_callback(struct iocb *iocb, io_callback_t cb)" ++.BI "static inline void io_set_callback(struct iocb *" iocb ", io_callback_t " cb ");" + .sp + struct iocb { + void *data; +@@ -25,7 +25,8 @@ typedef void (*io_callback_t)(io_context_t ctx, struct iocb *iocb, long res, lon + .fi + .SH DESCRIPTION + The callback is not done if the caller uses raw events from +-io_getevents, only with the library helpers. ++.BR io_getevents (3), ++only with the library helpers. + .SH "RETURN VALUES" + None. + .SH ERRORS +diff --git a/man/io_submit.3 b/man/io_submit.3 +index 01c25cd..a195653 100644 +--- a/man/io_submit.3 ++++ b/man/io_submit.3 +@@ -32,21 +32,21 @@ struct iocb { + }; + .fi + .SH DESCRIPTION +-.B io_submit ++.BR io_submit () + submits + .I nr + iocbs for processing for a given io context ctx. + + The +-.IR "io_submit" ++.BR io_submit () + function can be used to enqueue an arbitrary + number of read and write requests at one time. The requests can all be + meant for the same file, all for different files or every solution in + between. + +-.IR "io_submit" ++.BR io_submit () + gets the +-.IR "nr" ++.I nr + requests from the array pointed to + by + .IR "iocbs" . +@@ -75,10 +75,10 @@ in which case this element of + .IR "iocbs" + is simply ignored. This + ``operation'' is useful in situations where one has a fixed array of +-.IR "struct iocb" ++.B struct iocb + elements from which only a few need to be handled at + a time. Another situation is where the +-.IR "io_submit" ++.BR io_submit (3) + call was + canceled before all requests are processed and the remaining requests have to be reissued. + +@@ -86,15 +86,15 @@ The other members of each element of the array pointed to by + .IR "iocbs" + must have values suitable for the operation as described in + the documentation for +-.IR "io_prep_pread" ++.BR io_prep_pread (3) + and +-.IR "io_prep_pwrite" ++.BR io_prep_pwrite (3) + above. + + The function returns immediately after + having enqueued all the requests. + On success, +-.B io_submit ++.BR io_submit () + returns the number of iocbs submitted successfully. Otherwise, -error is return, where + error is one of the Exxx values defined in the Errors section. + .PP +@@ -115,10 +115,14 @@ refers to an uninitialized aio context, the iocb pointed to by + contains an improperly initialized iocb, + .TP + .B EBADF +-The iocb contains a file descriptor that does not exist. ++The ++.I iocb ++contains a file descriptor that does not exist. + .TP + .B EINVAL +-The file specified in the iocb does not support the given io operation. ++The file specified in the ++.I iocb ++does not support the given io operation. + .SH "SEE ALSO" + .BR io (3), + .BR io_cancel (3), +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0013-man-Fold-short-lines.patch libaio-0.3.112/debian/patches/0013-man-Fold-short-lines.patch --- libaio-0.3.112/debian/patches/0013-man-Fold-short-lines.patch 2019-02-25 01:49:18.000000000 +0000 +++ libaio-0.3.112/debian/patches/0013-man-Fold-short-lines.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,54 +0,0 @@ -From 312d88fe494adc12737a6019d917be9fba757b8e Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Fri, 8 Feb 2019 22:45:18 +0100 -Subject: [PATCH 13/15] man: Fold short lines - -Signed-off-by: Guillem Jover ---- - man/io_prep_fsync.3 | 3 +-- - man/io_submit.3 | 9 +++------ - 2 files changed, 4 insertions(+), 8 deletions(-) - -diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3 -index 61e8850..31cc9c5 100644 ---- a/man/io_prep_fsync.3 -+++ b/man/io_prep_fsync.3 -@@ -39,8 +39,7 @@ The file for which - .nf - .IR "iocb->aio_fildes = fd" - .fi --is a descriptor is set up with --the command -+is a descriptor is set up with the command - .nf - .IR "iocb->aio_lio_opcode = IO_CMD_FSYNC" - .fi -diff --git a/man/io_submit.3 b/man/io_submit.3 -index 587045b..7f4e27a 100644 ---- a/man/io_submit.3 -+++ b/man/io_submit.3 -@@ -47,18 +47,15 @@ between. - .BR io_submit () - gets the - .I nr --requests from the array pointed to --by -+requests from the array pointed to by - .IR "iocbs" . - The operation to be performed is determined by the - .IR "aio_lio_opcode" - member in each element of - .IR "iocbs" . --If this --field is -+If this field is - .B "IO_CMD_PREAD" --a read operation is enqueued, similar to a call --of -+a read operation is enqueued, similar to a call of - .IR "io_prep_pread" - for this element of the array (except that the way - the termination is signalled is different, as we will see below). If --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0014-man-Escape-verbatim-n-in-order-to-make-it-through-ro.patch libaio-0.3.112/debian/patches/0014-man-Escape-verbatim-n-in-order-to-make-it-through-ro.patch --- libaio-0.3.112/debian/patches/0014-man-Escape-verbatim-n-in-order-to-make-it-through-ro.patch 2019-02-25 01:49:18.000000000 +0000 +++ libaio-0.3.112/debian/patches/0014-man-Escape-verbatim-n-in-order-to-make-it-through-ro.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -From 91cfb8e29f999a5eb72f256cf9649d1c71ccabe7 Mon Sep 17 00:00:00 2001 -From: Stephan Springl -Date: Sat, 9 Feb 2019 00:03:54 +0100 -Subject: [PATCH 14/15] man: Escape verbatim \n in order to make it through - roff - -Signed-off-by: Guillem Jover ---- - man/io.3 | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/man/io.3 b/man/io.3 -index bbb0a2d..2840bc7 100644 ---- a/man/io.3 -+++ b/man/io.3 -@@ -174,11 +174,11 @@ static const char *srcname = NULL; - static void io_error(const char *func, int rc) - { - if (rc == -ENOSYS) -- fprintf(stderr, "AIO not in this kernel\n"); -+ fprintf(stderr, "AIO not in this kernel\\n"); - else if (rc < 0 && -rc < sys_nerr) -- fprintf(stderr, "%s: %s\n", func, sys_errlist[-rc]); -+ fprintf(stderr, "%s: %s\\n", func, sys_errlist[-rc]); - else -- fprintf(stderr, "%s: error %d\n", func, rc); -+ fprintf(stderr, "%s: error %d\\n", func, rc); - - if (dstfd > 0) - close(dstfd); -@@ -197,7 +197,7 @@ static void wr_done(io_context_t ctx, struct iocb *iocb, long res, long res2) - io_error("aio write", res2); - } - if (res != iocb->u.c.nbytes) { -- fprintf(stderr, "write missed bytes expect %d got %d\n", iocb->u.c.nbytes, res2); -+ fprintf(stderr, "write missed bytes expect %d got %d\\n", iocb->u.c.nbytes, res2); - exit(1); - } - --tocopy; -@@ -223,7 +223,7 @@ static void rd_done(io_context_t ctx, struct iocb *iocb, long res, long res2) - if (res2 != 0) - io_error("aio read", res2); - if (res != iosize) { -- fprintf(stderr, "read missing bytes expect %d got %d\n", iocb->u.c.nbytes, res); -+ fprintf(stderr, "read missing bytes expect %d got %d\\n", iocb->u.c.nbytes, res); - exit(1); - } - -@@ -283,7 +283,7 @@ int main(int argc, char *const *argv) - char *buf = (char *) malloc(iosize); - - if (NULL == buf || NULL == io) { -- fprintf(stderr, "out of memory\n"); -+ fprintf(stderr, "out of memory\\n"); - exit(1); - } - --- -2.21.0.rc2.261.ga7da99ff1b - diff -Nru libaio-0.3.112/debian/patches/0014-man-Fold-short-lines.patch libaio-0.3.112/debian/patches/0014-man-Fold-short-lines.patch --- libaio-0.3.112/debian/patches/0014-man-Fold-short-lines.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0014-man-Fold-short-lines.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,55 @@ +From 96fe0e8a3efb8bb058852a46c0273125dd54ba49 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:18:12 +0200 +Subject: [PATCH libaio 14/26] man: Fold short lines + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + man/io_prep_fsync.3 | 3 +-- + man/io_submit.3 | 9 +++------ + 2 files changed, 4 insertions(+), 8 deletions(-) + +diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3 +index d332709..419dfeb 100644 +--- a/man/io_prep_fsync.3 ++++ b/man/io_prep_fsync.3 +@@ -39,8 +39,7 @@ The file for which + .nf + .IR "iocb->aio_fildes = fd" + .fi +-is a descriptor is set up with +-the command ++is a descriptor is set up with the command + .nf + .IR "iocb->aio_lio_opcode = IO_CMD_FSYNC" + .fi +diff --git a/man/io_submit.3 b/man/io_submit.3 +index a195653..c0791ed 100644 +--- a/man/io_submit.3 ++++ b/man/io_submit.3 +@@ -47,18 +47,15 @@ between. + .BR io_submit () + gets the + .I nr +-requests from the array pointed to +-by ++requests from the array pointed to by + .IR "iocbs" . + The operation to be performed is determined by the + .IR "aio_lio_opcode" + member in each element of + .IR "iocbs" . +-If this +-field is ++If this field is + .B "IO_CMD_PREAD" +-a read operation is enqueued, similar to a call +-of ++a read operation is enqueued, similar to a call of + .IR "io_prep_pread" + for this element of the array (except that the way + the termination is signalled is different, as we will see below). If +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0015-man-Escape-verbatim-n-in-order-to-make-it-through-ro.patch libaio-0.3.112/debian/patches/0015-man-Escape-verbatim-n-in-order-to-make-it-through-ro.patch --- libaio-0.3.112/debian/patches/0015-man-Escape-verbatim-n-in-order-to-make-it-through-ro.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0015-man-Escape-verbatim-n-in-order-to-make-it-through-ro.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,61 @@ +From 6f0b6fb5bb3ac118cb56848e52d40ff7e1ece3d1 Mon Sep 17 00:00:00 2001 +From: Stephan Springl +Date: Sat, 20 Jul 2019 21:18:13 +0200 +Subject: [PATCH libaio 15/26] man: Escape verbatim \n in order to make it + through roff + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + man/io.3 | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/man/io.3 b/man/io.3 +index f40da41..bfa9836 100644 +--- a/man/io.3 ++++ b/man/io.3 +@@ -174,11 +174,11 @@ static const char *srcname = NULL; + static void io_error(const char *func, int rc) + { + if (rc == -ENOSYS) +- fprintf(stderr, "AIO not in this kernel\n"); ++ fprintf(stderr, "AIO not in this kernel\\n"); + else if (rc < 0 && -rc < sys_nerr) +- fprintf(stderr, "%s: %s\n", func, sys_errlist[-rc]); ++ fprintf(stderr, "%s: %s\\n", func, sys_errlist[-rc]); + else +- fprintf(stderr, "%s: error %d\n", func, rc); ++ fprintf(stderr, "%s: error %d\\n", func, rc); + + if (dstfd > 0) + close(dstfd); +@@ -197,7 +197,7 @@ static void wr_done(io_context_t ctx, struct iocb *iocb, long res, long res2) + io_error("aio write", res2); + } + if (res != iocb->u.c.nbytes) { +- fprintf(stderr, "write missed bytes expect %d got %d\n", iocb->u.c.nbytes, res2); ++ fprintf(stderr, "write missed bytes expect %d got %d\\n", iocb->u.c.nbytes, res2); + exit(1); + } + --tocopy; +@@ -223,7 +223,7 @@ static void rd_done(io_context_t ctx, struct iocb *iocb, long res, long res2) + if (res2 != 0) + io_error("aio read", res2); + if (res != iosize) { +- fprintf(stderr, "read missing bytes expect %d got %d\n", iocb->u.c.nbytes, res); ++ fprintf(stderr, "read missing bytes expect %d got %d\\n", iocb->u.c.nbytes, res); + exit(1); + } + +@@ -283,7 +283,7 @@ int main(int argc, char *const *argv) + char *buf = (char *) malloc(iosize); + + if (NULL == buf || NULL == io) { +- fprintf(stderr, "out of memory\n"); ++ fprintf(stderr, "out of memory\\n"); + exit(1); + } + +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0015-Use-ctx-consistently-for-io_context_t-instead-of-ctx.patch libaio-0.3.112/debian/patches/0015-Use-ctx-consistently-for-io_context_t-instead-of-ctx.patch --- libaio-0.3.112/debian/patches/0015-Use-ctx-consistently-for-io_context_t-instead-of-ctx.patch 2019-02-25 01:49:18.000000000 +0000 +++ libaio-0.3.112/debian/patches/0015-Use-ctx-consistently-for-io_context_t-instead-of-ctx.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,132 +0,0 @@ -From 6eb4eab6a70b5ee0f549b9f0086a76becbe3d4ec Mon Sep 17 00:00:00 2001 -From: Guillem Jover -Date: Fri, 8 Feb 2019 23:37:58 +0100 -Subject: [PATCH 15/15] Use ctx consistently for io_context_t instead of ctx_id - -Signed-off-by: Guillem Jover ---- - man/io_cancel.3 | 2 +- - man/io_getevents.3 | 8 ++++---- - man/io_queue_run.3 | 2 +- - man/io_queue_wait.3 | 2 +- - man/io_submit.3 | 2 +- - src/compat-0_1.c | 4 ++-- - src/libaio.h | 4 ++-- - src/vsys_def.h | 2 +- - 8 files changed, 13 insertions(+), 13 deletions(-) - ---- a/man/io_cancel.3 -+++ b/man/io_cancel.3 -@@ -46,7 +46,7 @@ If any of the data structures pointed to - If - .I aio_context - specified by --.I ctx_id -+.I ctx - is invalid. - .TP - .B EAGAIN ---- a/man/io_getevents.3 -+++ b/man/io_getevents.3 -@@ -1,7 +1,7 @@ - .\"/* io_getevents: - .\" * Attempts to read at least min_nr events and up to nr events from --.\" * the completion queue for the aio_context specified by ctx_id. May --.\" * fail with -EINVAL if ctx_id is invalid, if min_nr is out of range, -+.\" * the completion queue for the aio_context specified by ctx. May -+.\" * fail with -EINVAL if ctx is invalid, if min_nr is out of range, - .\" * if nr is out of range, if when is out of range. May fail with - .\" * -EFAULT if any of the memory specified to is invalid. May return - .\" * 0 or < min_nr if no events are available and the timeout specified -@@ -10,7 +10,7 @@ - .\" * will be updated if not NULL and the operation blocks. Will fail - .\" * with -ENOSYS if not implemented. - .\" */ --.\"asmlinkage long sys_io_getevents(io_context_t ctx_id, -+.\"asmlinkage long sys_io_getevents(io_context_t ctx, - .\" long min_nr, - .\" long nr, - .\" struct io_event *events, -@@ -117,7 +117,7 @@ behaves the same as - .TP - .B EINVAL - If --.I ctx_id -+.I ctx - is invalid, if - .I min_nr - is out of range, if ---- a/man/io_queue_run.3 -+++ b/man/io_queue_run.3 -@@ -16,7 +16,7 @@ io_queue_run \- Handle completed io requ - .BR io_queue_run () - attempts to read all the events from - the completion queue for the aio_context specified by --.IR ctx_id . -+.IR ctx . - .SH "RETURN VALUES" - May return - .B 0 ---- a/man/io_queue_wait.3 -+++ b/man/io_queue_wait.3 -@@ -15,7 +15,7 @@ io_queue_wait \- Wait for io requests to - .BR io_queue_wait () - attempts to read an event from - the completion queue for the aio_context specified by --.IR ctx_id . -+.IR ctx . - .SH "RETURN VALUES" - May return - .B 0 ---- a/man/io_submit.3 -+++ b/man/io_submit.3 -@@ -1,7 +1,7 @@ - .\"/* sys_io_submit: - .\" * Queue the nr iocbs pointed to by iocbpp for processing. Returns - .\" * the number of iocbs queued. May return -EINVAL if the aio_context --.\" * specified by ctx_id is invalid, if nr is < 0, if the iocb at -+.\" * specified by ctx is invalid, if nr is < 0, if the iocb at - .\" * *iocbpp[0] is not properly initialized, if the operation specified - .\" * is invalid for the file descriptor in the iocb. May fail with - .\" * -EFAULT if any of the data structures point to invalid data. May ---- a/src/compat-0_1.c -+++ b/src/compat-0_1.c -@@ -49,14 +49,14 @@ int compat0_1_io_queue_wait(io_context_t - - /* ABI change. Provide backwards compatibility for this one. */ - SYMVER(compat0_1_io_getevents, io_getevents, 0.1); --int compat0_1_io_getevents(io_context_t ctx_id, long nr, -+int compat0_1_io_getevents(io_context_t ctx, long nr, - struct io_event *events, - const struct timespec *const_timeout) - { - struct timespec timeout; - if (const_timeout) - timeout = *const_timeout; -- return io_getevents(ctx_id, 1, nr, events, -+ return io_getevents(ctx, 1, nr, events, - const_timeout ? &timeout : NULL); - } - ---- a/src/libaio.h -+++ b/src/libaio.h -@@ -168,8 +168,8 @@ extern int io_setup(int maxevents, io_co - extern int io_destroy(io_context_t ctx); - extern int io_submit(io_context_t ctx, long nr, struct iocb *ios[]); - extern int io_cancel(io_context_t ctx, struct iocb *iocb, struct io_event *evt); --extern int io_getevents(io_context_t ctx_id, long min_nr, long nr, struct io_event *events, struct timespec *timeout); --extern int io_pgetevents(io_context_t ctx_id, long min_nr, long nr, -+extern int io_getevents(io_context_t ctx, long min_nr, long nr, struct io_event *events, struct timespec *timeout); -+extern int io_pgetevents(io_context_t ctx, long min_nr, long nr, - struct io_event *events, struct timespec *timeout, - sigset_t *sigmask); - ---- a/src/vsys_def.h -+++ b/src/vsys_def.h -@@ -20,5 +20,5 @@ extern int vsys_io_destroy(io_context_t - extern int vsys_io_submit(io_context_t ctx, long nr, struct iocb *iocbs[]); - extern int vsys_io_cancel(io_context_t ctx, struct iocb *iocb); - extern int vsys_io_wait(io_context_t ctx, struct iocb *iocb, const struct timespec *when); --extern int vsys_io_getevents(io_context_t ctx_id, long nr, struct io_event *events, const struct timespec *timeout); -+extern int vsys_io_getevents(io_context_t ctx, long nr, struct io_event *events, const struct timespec *timeout); - diff -Nru libaio-0.3.112/debian/patches/0016-Use-ctx-consistently-for-io_context_t-instead-of-ctx.patch libaio-0.3.112/debian/patches/0016-Use-ctx-consistently-for-io_context_t-instead-of-ctx.patch --- libaio-0.3.112/debian/patches/0016-Use-ctx-consistently-for-io_context_t-instead-of-ctx.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0016-Use-ctx-consistently-for-io_context_t-instead-of-ctx.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,153 @@ +From e2175569737a2905d3c7a6e6ff664f0febcf5a28 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:18:14 +0200 +Subject: [PATCH libaio 16/26] Use ctx consistently for io_context_t instead of + ctx_id + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + man/io_cancel.3 | 2 +- + man/io_getevents.3 | 8 ++++---- + man/io_queue_run.3 | 2 +- + man/io_queue_wait.3 | 2 +- + man/io_submit.3 | 2 +- + src/compat-0_1.c | 4 ++-- + src/libaio.h | 4 ++-- + src/vsys_def.h | 2 +- + 8 files changed, 13 insertions(+), 13 deletions(-) + +diff --git a/man/io_cancel.3 b/man/io_cancel.3 +index 3ca629b..8c6910e 100644 +--- a/man/io_cancel.3 ++++ b/man/io_cancel.3 +@@ -46,7 +46,7 @@ If any of the data structures pointed to are invalid. + If + .I aio_context + specified by +-.I ctx_id ++.I ctx + is invalid. + .TP + .B EAGAIN +diff --git a/man/io_getevents.3 b/man/io_getevents.3 +index 6fbcc24..6ff686d 100644 +--- a/man/io_getevents.3 ++++ b/man/io_getevents.3 +@@ -1,7 +1,7 @@ + .\"/* io_getevents: + .\" * Attempts to read at least min_nr events and up to nr events from +-.\" * the completion queue for the aio_context specified by ctx_id. May +-.\" * fail with -EINVAL if ctx_id is invalid, if min_nr is out of range, ++.\" * the completion queue for the aio_context specified by ctx. May ++.\" * fail with -EINVAL if ctx is invalid, if min_nr is out of range, + .\" * if nr is out of range, if when is out of range. May fail with + .\" * -EFAULT if any of the memory specified to is invalid. May return + .\" * 0 or < min_nr if no events are available and the timeout specified +@@ -10,7 +10,7 @@ + .\" * will be updated if not NULL and the operation blocks. Will fail + .\" * with -ENOSYS if not implemented. + .\" */ +-.\"asmlinkage long sys_io_getevents(io_context_t ctx_id, ++.\"asmlinkage long sys_io_getevents(io_context_t ctx, + .\" long min_nr, + .\" long nr, + .\" struct io_event *events, +@@ -117,7 +117,7 @@ behaves the same as + .TP + .B EINVAL + If +-.I ctx_id ++.I ctx + is invalid, if + .I min_nr + is out of range, if +diff --git a/man/io_queue_run.3 b/man/io_queue_run.3 +index 93e322b..2bb9701 100644 +--- a/man/io_queue_run.3 ++++ b/man/io_queue_run.3 +@@ -16,7 +16,7 @@ io_queue_run \- Handle completed io requests + .BR io_queue_run () + attempts to read all the events from + the completion queue for the aio_context specified by +-.IR ctx_id . ++.IR ctx . + .SH "RETURN VALUES" + May return + .B 0 +diff --git a/man/io_queue_wait.3 b/man/io_queue_wait.3 +index ad5e7f4..1cf4f0b 100644 +--- a/man/io_queue_wait.3 ++++ b/man/io_queue_wait.3 +@@ -15,7 +15,7 @@ io_queue_wait \- Wait for io requests to complete + .BR io_queue_wait () + attempts to read an event from + the completion queue for the aio_context specified by +-.IR ctx_id . ++.IR ctx . + .SH "RETURN VALUES" + May return + .B 0 +diff --git a/man/io_submit.3 b/man/io_submit.3 +index c0791ed..c15134f 100644 +--- a/man/io_submit.3 ++++ b/man/io_submit.3 +@@ -1,7 +1,7 @@ + .\"/* sys_io_submit: + .\" * Queue the nr iocbs pointed to by iocbpp for processing. Returns + .\" * the number of iocbs queued. May return -EINVAL if the aio_context +-.\" * specified by ctx_id is invalid, if nr is < 0, if the iocb at ++.\" * specified by ctx is invalid, if nr is < 0, if the iocb at + .\" * *iocbpp[0] is not properly initialized, if the operation specified + .\" * is invalid for the file descriptor in the iocb. May fail with + .\" * -EFAULT if any of the data structures point to invalid data. May +diff --git a/src/compat-0_1.c b/src/compat-0_1.c +index 136396f..722e107 100644 +--- a/src/compat-0_1.c ++++ b/src/compat-0_1.c +@@ -49,14 +49,14 @@ int compat0_1_io_queue_wait(io_context_t ctx, struct timespec *when) + + /* ABI change. Provide backwards compatibility for this one. */ + SYMVER(compat0_1_io_getevents, io_getevents, 0.1); +-int compat0_1_io_getevents(io_context_t ctx_id, long nr, ++int compat0_1_io_getevents(io_context_t ctx, long nr, + struct io_event *events, + const struct timespec *const_timeout) + { + struct timespec timeout; + if (const_timeout) + timeout = *const_timeout; +- return io_getevents(ctx_id, 1, nr, events, ++ return io_getevents(ctx, 1, nr, events, + const_timeout ? &timeout : NULL); + } + +diff --git a/src/libaio.h b/src/libaio.h +index 2bc24e0..8b33382 100644 +--- a/src/libaio.h ++++ b/src/libaio.h +@@ -162,8 +162,8 @@ extern int io_setup(int maxevents, io_context_t *ctxp); + extern int io_destroy(io_context_t ctx); + extern int io_submit(io_context_t ctx, long nr, struct iocb *ios[]); + extern int io_cancel(io_context_t ctx, struct iocb *iocb, struct io_event *evt); +-extern int io_getevents(io_context_t ctx_id, long min_nr, long nr, struct io_event *events, struct timespec *timeout); +-extern int io_pgetevents(io_context_t ctx_id, long min_nr, long nr, ++extern int io_getevents(io_context_t ctx, long min_nr, long nr, struct io_event *events, struct timespec *timeout); ++extern int io_pgetevents(io_context_t ctx, long min_nr, long nr, + struct io_event *events, struct timespec *timeout, + sigset_t *sigmask); + +diff --git a/src/vsys_def.h b/src/vsys_def.h +index 13d032e..dd711dc 100644 +--- a/src/vsys_def.h ++++ b/src/vsys_def.h +@@ -20,5 +20,5 @@ extern int vsys_io_destroy(io_context_t ctx); + extern int vsys_io_submit(io_context_t ctx, long nr, struct iocb *iocbs[]); + extern int vsys_io_cancel(io_context_t ctx, struct iocb *iocb); + extern int vsys_io_wait(io_context_t ctx, struct iocb *iocb, const struct timespec *when); +-extern int vsys_io_getevents(io_context_t ctx_id, long nr, struct io_event *events, const struct timespec *timeout); ++extern int vsys_io_getevents(io_context_t ctx, long nr, struct io_event *events, const struct timespec *timeout); + +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0017-harness-Use-destination-strncpy-expression-for-sizeo.patch libaio-0.3.112/debian/patches/0017-harness-Use-destination-strncpy-expression-for-sizeo.patch --- libaio-0.3.112/debian/patches/0017-harness-Use-destination-strncpy-expression-for-sizeo.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0017-harness-Use-destination-strncpy-expression-for-sizeo.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,53 @@ +From b9e17f6afdc4d0e81b1598aecea7b80d0c54b13a Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:20:58 +0200 +Subject: [PATCH libaio 17/26] harness: Use destination strncpy() expression + for sizeof() argument +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Even though this is the same size, as the sizeof() is derived from the +source expression, recent gcc versions will emit a warning, which is +turned into an error by -Werror: + + error: argument to ‘sizeof’ in ‘strncpy’ call is the same expression + as the source; did you mean to use the size of the destination? + [-Werror=sizeof-pointer-memaccess] + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + harness/cases/19.t | 2 +- + harness/cases/21.t | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/harness/cases/19.t b/harness/cases/19.t +index 4989510..5c3e0d6 100644 +--- a/harness/cases/19.t ++++ b/harness/cases/19.t +@@ -41,7 +41,7 @@ open_temp_file(void) + int fd; + char template[sizeof(TEMPLATE)]; + +- strncpy(template, TEMPLATE, sizeof(TEMPLATE)); ++ strncpy(template, TEMPLATE, sizeof(template)); + fd = mkostemp(template, O_DIRECT); + if (fd < 0) { + perror("mkstemp"); +diff --git a/harness/cases/21.t b/harness/cases/21.t +index 441eaa8..fe33a9d 100644 +--- a/harness/cases/21.t ++++ b/harness/cases/21.t +@@ -43,7 +43,7 @@ open_temp_file() + int fd; + char temp_file[sizeof(TEMPLATE)]; + +- strncpy(temp_file, TEMPLATE, sizeof(TEMPLATE)); ++ strncpy(temp_file, TEMPLATE, sizeof(temp_file)); + fd = mkstemp(temp_file); + if (fd < 0) { + perror("mkstemp"); +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0018-harness-Use-run-time-_SC_PAGE_SIZE-instead-of-build-.patch libaio-0.3.112/debian/patches/0018-harness-Use-run-time-_SC_PAGE_SIZE-instead-of-build-.patch --- libaio-0.3.112/debian/patches/0018-harness-Use-run-time-_SC_PAGE_SIZE-instead-of-build-.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0018-harness-Use-run-time-_SC_PAGE_SIZE-instead-of-build-.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,116 @@ +From fca5217d524635bed70532aa68baff065d22d790 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:20:59 +0200 +Subject: [PATCH libaio 18/26] harness: Use run-time _SC_PAGE_SIZE instead of + build-time PAGESIZE + +The getconf(1) command is inherently not cross-compilation friendly. +In addition PAGESIZE depends on the specific system, even within a +specific arch, so using a hard-coded value is never safe. + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + harness/Makefile | 2 +- + harness/cases/18.t | 34 ++++++++++++++++++++++++---------- + 2 files changed, 25 insertions(+), 11 deletions(-) + +diff --git a/harness/Makefile b/harness/Makefile +index 87b33f6..5cc2b25 100644 +--- a/harness/Makefile ++++ b/harness/Makefile +@@ -6,7 +6,7 @@ PROGS:=$(PARTPROGS) $(EXTRAPROGS) + HARNESS_SRCS:=main.c + # io_queue.c + +-CFLAGS+=-Wall -Werror -I../src -g -O2 -DPAGE_SIZE=$(shell getconf PAGESIZE) ++CFLAGS+=-Wall -Werror -I../src -g -O2 + #-lpthread -lrt + + # Change this on the build line to run tests against the installed libraries: +diff --git a/harness/cases/18.t b/harness/cases/18.t +index 5587ceb..daa1d26 100644 +--- a/harness/cases/18.t ++++ b/harness/cases/18.t +@@ -40,11 +40,17 @@ + + #define THREADS_NUM 100 + ++static size_t page_size; ++ + void + aio_worker(void *ptr) + { +- int i, j, fd; +- char buffer[PAGE_SIZE] __attribute__((aligned(PAGE_SIZE))); ++ int i, j, fd, ret; ++ char *buffer = NULL; ++ ++ ret = posix_memalign((void **)&buffer, page_size, page_size); ++ assert(ret == 0); ++ assert(buffer != NULL); + + fd = open(FILENAME, O_DIRECT|O_RDONLY); + assert(fd >= 0); +@@ -55,19 +61,19 @@ aio_worker(void *ptr) + struct iocb *cbs[1]; + + assert(!io_queue_init(1, &ctx)); +- io_prep_pread(&cb, fd, buffer, PAGE_SIZE, 0); ++ io_prep_pread(&cb, fd, buffer, page_size, 0); + cbs[0] = &cb; + +- memset(buffer, '0', PAGE_SIZE); ++ memset(buffer, '0', page_size); + assert(io_submit(ctx, 1, &cbs[0]) == 1); + // wait random time (0-500ms) ? + + io_destroy(ctx); +- memset(buffer, DESTROY_PATTERN, PAGE_SIZE); ++ memset(buffer, DESTROY_PATTERN, page_size); + // wait random for (0-500ms) ? + + // check it is still DESTROY_PATTERN +- for (j = 0; j < PAGE_SIZE; j++) { ++ for (j = 0; j < page_size; j++) { + if (buffer[j] != DESTROY_PATTERN) { + fprintf(stderr, + "Buffer has unexpected character: %c\n", +@@ -77,6 +83,7 @@ aio_worker(void *ptr) + } + } + ++ free(buffer); + close(fd); + } + +@@ -84,15 +91,22 @@ int + test_main(void) + { + int i, fd, ret; +- char buffer[PAGE_SIZE]; ++ char *buffer = NULL; + pthread_t threads[THREADS_NUM]; + ++ page_size = sysconf(_SC_PAGESIZE); ++ assert(page_size >= 1); ++ ++ ret = posix_memalign((void **)&buffer, page_size, page_size); ++ assert(ret == 0); ++ assert(buffer != NULL); ++ + fd = open(FILENAME, O_CREAT|O_TRUNC|O_APPEND|O_RDWR, S_IRUSR|S_IWUSR); + assert(fd != -1); + +- memset(buffer, FILEPATTERN, PAGE_SIZE); +- ret = write(fd, buffer, PAGE_SIZE); +- assert(ret == PAGE_SIZE); ++ memset(buffer, FILEPATTERN, page_size); ++ ret = write(fd, buffer, page_size); ++ assert(ret == page_size); + close(fd); + + for (i = 0; i < THREADS_NUM; i++) { +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0019-harness-Make-RISC-V-use-SYS_eventfd2-instead-of-unav.patch libaio-0.3.112/debian/patches/0019-harness-Make-RISC-V-use-SYS_eventfd2-instead-of-unav.patch --- libaio-0.3.112/debian/patches/0019-harness-Make-RISC-V-use-SYS_eventfd2-instead-of-unav.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0019-harness-Make-RISC-V-use-SYS_eventfd2-instead-of-unav.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,38 @@ +From f322f467c3cd2ac4d8d08a19bd281eabb65433b1 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:21:00 +0200 +Subject: [PATCH libaio 19/26] harness: Make RISC-V use SYS_eventfd2 instead of + unavailable SYS_eventfd + +This is a recent architecture and as such does not provide legacy +support for SYS_eventfd. Declare that we need to use the new syscall. + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + harness/cases/16.t | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/harness/cases/16.t b/harness/cases/16.t +index 5a546ff..b36bbd2 100644 +--- a/harness/cases/16.t ++++ b/harness/cases/16.t +@@ -18,12 +18,12 @@ + #define SYS_eventfd 318 + #elif defined(__alpha__) + #define SYS_eventfd 478 +-#elif defined(__aarch64__) +-/* arm64 does not implement eventfd, only eventfd2 */ ++#elif defined(__aarch64__) || defined(__riscv) ++/* arm64 and riscv do not implement eventfd, only eventfd2 */ + #define USE_EVENTFD2 + #ifndef SYS_eventfd2 + #define SYS_eventfd2 19 +-#endif /* __aarch64__ */ ++#endif /* __aarch64__ || __riscv */ + #else + #error define SYS_eventfd for your arch! + #endif +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0020-harness-Make-the-test-exit-with-a-code-matching-the-.patch libaio-0.3.112/debian/patches/0020-harness-Make-the-test-exit-with-a-code-matching-the-.patch --- libaio-0.3.112/debian/patches/0020-harness-Make-the-test-exit-with-a-code-matching-the-.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0020-harness-Make-the-test-exit-with-a-code-matching-the-.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,28 @@ +From abcb9eeacc2f12c3d77b66c274ace9bffecf68e3 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Tue, 23 Jul 2019 02:48:43 +0200 +Subject: [PATCH libaio 20/26] harness: Make the test exit with a code matching + the pass/fail state + +This way we can use the exit code to check whether the tests passed or +failed, and fail the package build. + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + harness/runtests.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/harness/runtests.sh b/harness/runtests.sh +index 717c72a..ef269a7 100755 +--- a/harness/runtests.sh ++++ b/harness/runtests.sh +@@ -17,3 +17,5 @@ done + + echo "Pass: $passes Fail: $fails" + echo "Test run complete at" `date` ++ ++exit $fails +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0021-harness-add-support-for-skipping-tests.patch libaio-0.3.112/debian/patches/0021-harness-add-support-for-skipping-tests.patch --- libaio-0.3.112/debian/patches/0021-harness-add-support-for-skipping-tests.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0021-harness-add-support-for-skipping-tests.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,89 @@ +From 90ec55ab2675bc2b6b4d256f78a3db26adf75900 Mon Sep 17 00:00:00 2001 +From: Jeff Moyer +Date: Mon, 29 Jul 2019 13:16:18 -0400 +Subject: [PATCH libaio 21/26] harness: add support for skipping tests + +Skipped tests will not cause the test harness to return failure. An +exit status of "3" was chosen for skipped tests. This doesn't +conflict with any of the current tests. + +Signed-off-by: Jeff Moyer +--- + harness/main.c | 20 ++++++++++++++++---- + harness/runtests.sh | 14 ++++++++++++-- + 2 files changed, 28 insertions(+), 6 deletions(-) + +diff --git a/harness/main.c b/harness/main.c +index 9ecd5da..82e9c69 100644 +--- a/harness/main.c ++++ b/harness/main.c +@@ -26,15 +26,27 @@ char test_name[] = TEST_NAME; + int main(void) + { + int res; ++ const char *test_result; + + #if defined(SETUP) + SETUP; + #endif + + res = test_main(); +- printf("test %s completed %s.\n", test_name, +- res ? "FAILED" : "PASSED" +- ); ++ switch(res) { ++ case 0: ++ test_result = "PASSED"; ++ break; ++ case 3: ++ test_result = "SKIPPED"; ++ break; ++ default: ++ test_result = "FAILED"; ++ res = 1; ++ break; ++ } ++ ++ printf("test %s completed %s.\n", test_name, test_result); + fflush(stdout); +- return res ? 1 : 0; ++ return res; + } +diff --git a/harness/runtests.sh b/harness/runtests.sh +index ef269a7..e9ceec8 100755 +--- a/harness/runtests.sh ++++ b/harness/runtests.sh +@@ -2,6 +2,7 @@ + + passes=0 + fails=0 ++skips=0 + + echo "Test run starting at" `date` + +@@ -11,11 +12,20 @@ while [ $# -ge 1 ] ; do + echo "Starting $this_test" + $this_test 2>&1 + res=$? +- if [ $res -eq 0 ] ; then str="" ; passes=$[passes + 1] ; else str=" -- FAILED" ; fails=$[fails + 1] ; fi ++ if [ $res -eq 0 ]; then ++ str=""; ++ passes=$((passes + 1)); ++ elif [ $res -eq 3 ]; then ++ str=" -- SKIPPED"; ++ skips=$((skips + 1)); ++ else ++ str=" -- FAILED" ++ fails=$((fails + 1)); ++ fi + echo "Completed $this_test with $res$str". + done + +-echo "Pass: $passes Fail: $fails" ++echo "Pass: $passes Fail: $fails Skip: $skips" + echo "Test run complete at" `date` + + exit $fails +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0022-harness-Add-fallback-code-for-filesystems-not-suppor.patch libaio-0.3.112/debian/patches/0022-harness-Add-fallback-code-for-filesystems-not-suppor.patch --- libaio-0.3.112/debian/patches/0022-harness-Add-fallback-code-for-filesystems-not-suppor.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0022-harness-Add-fallback-code-for-filesystems-not-suppor.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,111 @@ +From ac60a850d5ce22ae21e3746f72a9ebb2623d17f8 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:21:01 +0200 +Subject: [PATCH libaio 22/26] harness: Add fallback code for filesystems not + supporting O_DIRECT + +When running the harness on a filesystem such as a tmpfs, which do not +support O_DIRECT, fallback to calls without the flag. + +Signed-off-by: Guillem Jover +[JEM: change from duplicating the open call to using F_SETFL] +[JEM: 18 and 21 require O_DIRECT-skip if not present] +Signed-off-by: Jeff Moyer +--- + harness/cases/17.t | 11 +++++++++-- + harness/cases/18.t | 2 ++ + harness/cases/19.t | 10 ++++++++-- + harness/cases/21.t | 5 ++++- + 4 files changed, 23 insertions(+), 5 deletions(-) + +diff --git a/harness/cases/17.t b/harness/cases/17.t +index 38ada4d..b4b6660 100644 +--- a/harness/cases/17.t ++++ b/harness/cases/17.t +@@ -119,7 +119,7 @@ void prune(io_context_t io_ctx, int max_ios, int getevents_type) + + void run_test(int max_ios, int getevents_type) + { +- int fd, ret; ++ int fd, ret, flags; + long i, to_submit; + struct iocb **iocb_sub; + io_context_t io_ctx; +@@ -137,9 +137,16 @@ void run_test(int max_ios, int getevents_type) + events = calloc(max_ios, sizeof(*events)); + + unlink(filename); +- fd = open(filename, O_CREAT | O_RDWR | O_DIRECT, 0644); ++ fd = open(filename, O_CREAT | O_RDWR, 0644); + assert(fd >= 0); + ++ /* ++ * Use O_DIRECT if it's available. If it's not, the test code ++ * will still operate correctly, just potentially slower. ++ */ ++ flags = fcntl(fd, F_GETFL, 0); ++ fcntl(fd, F_SETFL, flags | O_DIRECT); ++ + ret = ftruncate(fd, max_ios * io_size); + assert(!ret); + +diff --git a/harness/cases/18.t b/harness/cases/18.t +index daa1d26..e8dbcd1 100644 +--- a/harness/cases/18.t ++++ b/harness/cases/18.t +@@ -53,6 +53,8 @@ aio_worker(void *ptr) + assert(buffer != NULL); + + fd = open(FILENAME, O_DIRECT|O_RDONLY); ++ if (fd < 0 && errno == EINVAL) ++ exit(3); /* skip this test, O_DIRECT is unavailable */ + assert(fd >= 0); + + for (i = 0; i < 1000; i++) { +diff --git a/harness/cases/19.t b/harness/cases/19.t +index 5c3e0d6..ba1c620 100644 +--- a/harness/cases/19.t ++++ b/harness/cases/19.t +@@ -38,15 +38,21 @@ struct aio_ring { + int + open_temp_file(void) + { +- int fd; ++ int fd, flags; + char template[sizeof(TEMPLATE)]; + + strncpy(template, TEMPLATE, sizeof(template)); +- fd = mkostemp(template, O_DIRECT); ++ fd = mkstemp(template); + if (fd < 0) { + perror("mkstemp"); + exit(1); + } ++ /* ++ * O_DIRECT is desirable, but not required for this test. ++ */ ++ flags = fcntl(F_GETFL, 0); ++ fcntl(F_SETFL, flags | O_DIRECT); ++ + unlink(template); + return fd; + } +diff --git a/harness/cases/21.t b/harness/cases/21.t +index fe33a9d..ba988ed 100644 +--- a/harness/cases/21.t ++++ b/harness/cases/21.t +@@ -92,7 +92,10 @@ test_main() + */ + flags = fcntl(fd, F_GETFL); + ret = fcntl(fd, F_SETFL, flags | O_DIRECT); +- if (ret != 0) { ++ if (ret < 0) { ++ /* SKIP this test if O_DIRECT is not available on this fs */ ++ if (errno == EINVAL) ++ return 3; + perror("fcntl"); + return 1; + } +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0023-harness-Handle-ENOTSUP-from-io_submit-with-RWF_NOWAI.patch libaio-0.3.112/debian/patches/0023-harness-Handle-ENOTSUP-from-io_submit-with-RWF_NOWAI.patch --- libaio-0.3.112/debian/patches/0023-harness-Handle-ENOTSUP-from-io_submit-with-RWF_NOWAI.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0023-harness-Handle-ENOTSUP-from-io_submit-with-RWF_NOWAI.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,45 @@ +From b7e04d72bda89f22ce013030358e6743417f7fea Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Sat, 20 Jul 2019 21:21:02 +0200 +Subject: [PATCH libaio 23/26] harness: Handle -ENOTSUP from io_submit() with + RWF_NOWAIT + +On filesystems such as tmpfs the syscall might return -ENOTSUP instead +of EINVAL when it does not support the RWF_NOWAIT flag. + +Signed-off-by: Guillem Jover +[JEM: skip the test instead of returning success] +[JEM: make the error message differentiate between kernel and fs support] +Signed-off-by: Jeff Moyer +--- + harness/cases/21.t | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/harness/cases/21.t b/harness/cases/21.t +index ba988ed..4164c02 100644 +--- a/harness/cases/21.t ++++ b/harness/cases/21.t +@@ -108,13 +108,15 @@ test_main() + ret = io_submit(ctx, 1, &iocbp); + + /* +- * io_submit will return -EINVAL if RWF_NOWAIT is not supported. ++ * io_submit will return -EINVAL if RWF_NOWAIT is not supported by ++ * the kernel, and EOPNOTSUPP if it's not supported by the fs. + */ + if (ret != 1) { +- if (ret == -EINVAL) { +- fprintf(stderr, "RWF_NOWAIT not supported by kernel.\n"); +- /* just return success */ +- return 0; ++ if (ret == -EINVAL || ret == -ENOTSUP) { ++ fprintf(stderr, "RWF_NOWAIT not supported by %s.\n", ++ ret == -EINVAL ? "kernel" : "file system"); ++ /* skip this test */ ++ return 3; + } + errno = -ret; + perror("io_submit"); +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0024-harness-skip-22.p-if-async_poll-isn-t-supported.patch libaio-0.3.112/debian/patches/0024-harness-skip-22.p-if-async_poll-isn-t-supported.patch --- libaio-0.3.112/debian/patches/0024-harness-skip-22.p-if-async_poll-isn-t-supported.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0024-harness-skip-22.p-if-async_poll-isn-t-supported.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,52 @@ +From 79826d55b06a50ef1be2b723fe35a1e534cfbbaa Mon Sep 17 00:00:00 2001 +From: Jeff Moyer +Date: Mon, 29 Jul 2019 14:25:01 -0400 +Subject: [PATCH libaio 24/26] harness: skip 22.p if async_poll isn't supported + +Use the new skip error code instead of failing the test. Also +add in a Local variables: section for emacs. + +Signed-off-by: Jeff Moyer +--- + harness/cases/22.t | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/harness/cases/22.t b/harness/cases/22.t +index c7428a8..b13024e 100644 +--- a/harness/cases/22.t ++++ b/harness/cases/22.t +@@ -83,6 +83,9 @@ int test_main(void) + io_prep_poll(&iocb, pipe1[0], POLLIN); + ret = io_submit(ctx, 1, iocbs); + if (ret != 1) { ++ /* if poll isn't supported, skip the test */ ++ if (ret == -EINVAL) ++ return 3; + printf("child: io_submit failed\n"); + return 1; + } +@@ -120,7 +123,10 @@ int test_main(void) + + ret = io_submit(ctx, 1, iocbs); + if (ret != 1) { +- printf("parent: io_submit failed\n"); ++ /* if poll isn't supported, skip the test */ ++ if (ret == -EINVAL) ++ return 3; ++ printf("parent: io_submit failed with %d\n", ret); + return 1; + } + +@@ -147,3 +153,9 @@ int test_main(void) + return 0; + } + } ++/* ++ * Local variables: ++ * mode: c ++ * c-basic-offset: 8 ++ * End: ++ */ +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0025-harness-fix-read-into-PROT_WRITE-mmap-test.patch libaio-0.3.112/debian/patches/0025-harness-fix-read-into-PROT_WRITE-mmap-test.patch --- libaio-0.3.112/debian/patches/0025-harness-fix-read-into-PROT_WRITE-mmap-test.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0025-harness-fix-read-into-PROT_WRITE-mmap-test.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,40 @@ +From d7f5065448efb49b2a26e728ff735e12ea05b62e Mon Sep 17 00:00:00 2001 +From: Jeff Moyer +Date: Tue, 13 Aug 2019 15:30:05 -0400 +Subject: [PATCH libaio 25/26] harness: fix read into PROT_WRITE mmap test + +This test has been broken forever. Fix it up to perform an +aio_read using the result of a regular read as the expected +return code. + +Reported-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + harness/cases/5.t | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/harness/cases/5.t b/harness/cases/5.t +index 2b4b4bb..7d67562 100644 +--- a/harness/cases/5.t ++++ b/harness/cases/5.t +@@ -40,14 +40,14 @@ int test_main(void) + buf = mmap(0, page_size, PROT_WRITE, MAP_SHARED, rwfd, 0); + assert(buf != (char *)-1); + +- status |= attempt_rw(rwfd, buf, SIZE, 0, READ, SIZE); +- + /* Whether PROT_WRITE is readable is arch-dependent. So compare + * against read result. */ + res = read(rwfd, buf, SIZE); + if (res < 0) + res = -errno; +- status |= attempt_rw(rwfd, buf, SIZE, 0, WRITE, res); ++ status |= attempt_rw(rwfd, buf, SIZE, 0, READ, res); ++ ++ status |= attempt_rw(rwfd, buf, SIZE, 0, WRITE, SIZE); + + return status; + } +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/0026-harness-Fix-PROT_WRITE-mmap-check.patch libaio-0.3.112/debian/patches/0026-harness-Fix-PROT_WRITE-mmap-check.patch --- libaio-0.3.112/debian/patches/0026-harness-Fix-PROT_WRITE-mmap-check.patch 1970-01-01 00:00:00.000000000 +0000 +++ libaio-0.3.112/debian/patches/0026-harness-Fix-PROT_WRITE-mmap-check.patch 2019-08-16 02:47:08.000000000 +0000 @@ -0,0 +1,46 @@ +From 711c0381798c85f3e25ea0ab503b24857850a762 Mon Sep 17 00:00:00 2001 +From: Guillem Jover +Date: Wed, 14 Aug 2019 04:42:42 +0200 +Subject: [PATCH libaio 26/26] harness: Fix PROT_WRITE mmap check + +This partially reverts commit d7f5065448efb49b2a26e728ff735e12ea05b62e. + +The actual problem in the original code was that read() was being used +to assert whether the buffer was readable, but the kernel was instead +reading from the file descriptor and then writing into the buffer, so +no EFAULT was being generated (on architectures that do so). + +We needed to use a write() so that the kernel would read from the +buffer. + +Signed-off-by: Guillem Jover +Signed-off-by: Jeff Moyer +--- + harness/cases/5.t | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/harness/cases/5.t b/harness/cases/5.t +index 7d67562..b0a7c56 100644 +--- a/harness/cases/5.t ++++ b/harness/cases/5.t +@@ -41,13 +41,12 @@ int test_main(void) + assert(buf != (char *)-1); + + /* Whether PROT_WRITE is readable is arch-dependent. So compare +- * against read result. */ +- res = read(rwfd, buf, SIZE); ++ * against write() result (to make the kernel read from buf). */ ++ res = write(rwfd, buf, SIZE); + if (res < 0) + res = -errno; +- status |= attempt_rw(rwfd, buf, SIZE, 0, READ, res); +- +- status |= attempt_rw(rwfd, buf, SIZE, 0, WRITE, SIZE); ++ status |= attempt_rw(rwfd, buf, SIZE, 0, READ, SIZE); ++ status |= attempt_rw(rwfd, buf, SIZE, 0, WRITE, res); + + return status; + } +-- +2.23.0.rc1.170.gbd704faa3e + diff -Nru libaio-0.3.112/debian/patches/01_link_libs.patch libaio-0.3.112/debian/patches/01_link_libs.patch --- libaio-0.3.112/debian/patches/01_link_libs.patch 2018-03-17 22:11:12.000000000 +0000 +++ libaio-0.3.112/debian/patches/01_link_libs.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -Description: Link against libgcc and libc to avoid unresolved symbols - We need to link agaisnt -lgcc, on at least hppa. We also need to link - against -lc, because we are now always using the syscall() libc function. - So let's stop passing -nostdlib and -nostartfiles. - . - Note: we used to use -Wl,--as-needed, this way we made sure we pulled the - required fortified functions from the internal libc_nonshared.a, but did - not link against the shared library because we did not use any of its - symbols. -Author: Guillem Jover -Origin: vendor -Bug-Debian: 764509 -Forwarded: no -Last-Update: 2014-10-09 - - ---- - src/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/src/Makefile -+++ b/src/Makefile -@@ -3,7 +3,7 @@ includedir=$(prefix)/include - libdir=$(prefix)/lib - - CFLAGS ?= -g -fomit-frame-pointer -O2 --CFLAGS += -nostdlib -nostartfiles -Wall -I. -fPIC -+CFLAGS += -Wall -I. -fPIC - SO_CFLAGS=-shared $(CFLAGS) - L_CFLAGS=$(CFLAGS) - LINK_FLAGS= diff -Nru libaio-0.3.112/debian/patches/04_no_Werror.patch libaio-0.3.112/debian/patches/04_no_Werror.patch --- libaio-0.3.112/debian/patches/04_no_Werror.patch 2018-03-17 18:07:04.000000000 +0000 +++ libaio-0.3.112/debian/patches/04_no_Werror.patch 2019-08-16 02:49:28.000000000 +0000 @@ -17,8 +17,8 @@ HARNESS_SRCS:=main.c # io_queue.c --CFLAGS+=-Wall -Werror -I../src -g -O2 -DPAGE_SIZE=$(shell getconf PAGESIZE) -+CFLAGS+=-Wall -I../src -g -O2 -DPAGE_SIZE=$(shell getconf PAGESIZE) +-CFLAGS+=-Wall -Werror -I../src -g -O2 ++CFLAGS+=-Wall -I../src -g -O2 #-lpthread -lrt - all: $(PROGS) + # Change this on the build line to run tests against the installed libraries: diff -Nru libaio-0.3.112/debian/patches/05_build-flags.patch libaio-0.3.112/debian/patches/05_build-flags.patch --- libaio-0.3.112/debian/patches/05_build-flags.patch 2019-02-25 01:49:18.000000000 +0000 +++ libaio-0.3.112/debian/patches/05_build-flags.patch 2019-08-16 02:52:18.000000000 +0000 @@ -15,21 +15,24 @@ --- a/harness/Makefile +++ b/harness/Makefile -@@ -6,13 +6,16 @@ PROGS:=$(PARTPROGS) $(EXTRAPROGS) +@@ -6,8 +6,11 @@ PROGS:=$(PARTPROGS) $(EXTRAPROGS) HARNESS_SRCS:=main.c # io_queue.c --CFLAGS+=-Wall -I../src -g -O2 -DPAGE_SIZE=$(shell getconf PAGESIZE) -+MK_CPPFLAGS := -I../src -DPAGE_SIZE=$(shell getconf PAGESIZE) $(CPPFLAGS) +-CFLAGS+=-Wall -I../src -g -O2 ++MK_CPPFLAGS := -I../src $(CPPFLAGS) +CFLAGS = -Wall -g -O2 #-lpthread -lrt +MK_CFLAGS = $(CFLAGS) -+MK_LDFLAGS = main.c ../src/libaio.a -lpthread $(LDFLAGS) ++MK_LDFLAGS = main.c $(LIBAIO) -lpthread $(LDFLAGS) + # Change this on the build line to run tests against the installed libraries: + # make LIBAIO=-laio partcheck +@@ -16,7 +19,7 @@ LIBAIO?=../src/libaio.a all: $(PROGS) $(PROGS): %.p: %.t $(HARNESS_SRCS) -- $(CC) $(CFLAGS) -DTEST_NAME=\"$<\" -o $@ main.c ../src/libaio.a -lpthread +- $(CC) $(CFLAGS) -DTEST_NAME=\"$<\" -o $@ main.c $(LIBAIO) -lpthread + $(CC) $(MK_CPPFLAGS) $(MK_CFLAGS) -DTEST_NAME=\"$<\" -o $@ $(MK_LDFLAGS) clean: diff -Nru libaio-0.3.112/debian/patches/series libaio-0.3.112/debian/patches/series --- libaio-0.3.112/debian/patches/series 2019-02-26 04:24:50.000000000 +0000 +++ libaio-0.3.112/debian/patches/series 2019-08-16 02:55:25.000000000 +0000 @@ -1,34 +1,40 @@ +# Upstream commits +0001-Link-against-libgcc-to-avoid-unresolved-symbols.patch +0001-harness-allow-running-tests-against-the-installed-li.patch +0002-man-Add-missing-space-in-man-page-references.patch +0003-man-Use-the-correct-troff-macro-for-comments.patch +0004-man-Refer-to-libaio.h-instead-of-libio.h.patch +0005-man-End-sentences-with-a-period.patch +0006-man-Fix-casing.patch +0007-man-Fix-period-formatting.patch +0008-man-Remove-spurious-spaces.patch +0009-man-Remove-spurious-text.patch +0010-man-Add-None-to-empty-sections.patch +0011-man-Fix-typos.patch +0012-man-Fix-title-header.patch +0013-man-Fix-markup.patch +0014-man-Fold-short-lines.patch +0015-man-Escape-verbatim-n-in-order-to-make-it-through-ro.patch +0016-Use-ctx-consistently-for-io_context_t-instead-of-ctx.patch +0017-harness-Use-destination-strncpy-expression-for-sizeo.patch +0018-harness-Use-run-time-_SC_PAGE_SIZE-instead-of-build-.patch +0019-harness-Make-RISC-V-use-SYS_eventfd2-instead-of-unav.patch +0020-harness-Make-the-test-exit-with-a-code-matching-the-.patch +0021-harness-add-support-for-skipping-tests.patch +0022-harness-Add-fallback-code-for-filesystems-not-suppor.patch +0023-harness-Handle-ENOTSUP-from-io_submit-with-RWF_NOWAI.patch +0024-harness-skip-22.p-if-async_poll-isn-t-supported.patch +0025-harness-fix-read-into-PROT_WRITE-mmap-test.patch +0026-harness-Fix-PROT_WRITE-mmap-check.patch +# Local changes, pending submission 00_arches.patch 00_arches_sh.patch 00_arches_x32.patch 00_arches_mips_fix_padding.patch # Build system -01_link_libs.patch 02_libdevdir.patch 04_no_Werror.patch 05_build-flags.patch -# Harness fixes -0001-harness-Use-destination-strncpy-expression-for-sizeo.patch -0002-harness-Use-run-time-_SC_PAGE_SIZE-instead-of-build-.patch -0003-harness-Make-RISC-V-use-SYS_eventfd2-instead-of-SYS_.patch -0004-harness-Add-fallback-code-for-filesystems-not-suppor.patch -0005-harness-Handle-ENOTSUP-from-io_submit-with-RWF_NOWAI.patch -0006-harness-The-WRITE-call-does-not-change-across-differ.patch -# XXX: The test suite is not ready to pass on Debian's peculiar buildd setup. -#0007-harness-Make-the-test-exit-with-a-code-matching-the-.patch -# Man pages fixes -0001-man-Add-missing-space-in-man-page-references.patch -0002-man-Use-the-correct-troff-macro-for-comments.patch -0003-man-Refer-to-libaio.h-instead-of-libio.h.patch -0004-man-End-sentences-with-a-period.patch -0005-man-Fix-casing.patch -0006-man-Fix-period-formatting.patch -0007-man-Remove-spurious-spaces.patch -0008-man-Remove-spurious-text.patch -0009-man-Add-None-to-empty-sections.patch -0010-man-Fix-typos.patch -0011-man-Fix-title-header.patch -0012-man-Fix-markup.patch -0013-man-Fold-short-lines.patch -0014-man-Escape-verbatim-n-in-order-to-make-it-through-ro.patch -0015-Use-ctx-consistently-for-io_context_t-instead-of-ctx.patch +# Code and harness +0001-Fix-io_pgetevents-syscall-wrapper-on-32-bit-userland.patch +0001-harness-Print-better-error-messages-on-error-conditi.patch diff -Nru libaio-0.3.112/debian/rules libaio-0.3.112/debian/rules --- libaio-0.3.112/debian/rules 2019-02-25 01:56:07.000000000 +0000 +++ libaio-0.3.112/debian/rules 2019-08-16 02:47:08.000000000 +0000 @@ -35,8 +35,10 @@ dh_testdir ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) - $(MAKE) CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ - partcheck + -$(MAKE) partcheck \ + CPPFLAGS="$(CPPFLAGS)" \ + CFLAGS="$(CFLAGS)" \ + LDFLAGS="$(LDFLAGS)" endif install-arch: check-arch