[LTP] [PATCH] syscalls/io_pgetevents: Use tst_syscall() instead of syscall()

Viresh Kumar viresh.kumar@linaro.org
Wed Jan 29 11:58:34 CET 2020


Use the preferred helper tst_syscall() instead of syscall(), as it also
takes care of error handling.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 include/lapi/io_pgetevents.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/lapi/io_pgetevents.h b/include/lapi/io_pgetevents.h
index 9c7f0ec9d813..3c9d5b2d7618 100644
--- a/include/lapi/io_pgetevents.h
+++ b/include/lapi/io_pgetevents.h
@@ -21,7 +21,8 @@ int io_pgetevents(io_context_t ctx, long min_nr, long max_nr,
 		 struct io_event *events, struct timespec *timeout,
 		 sigset_t *sigmask)
 {
-	return syscall(__NR_io_pgetevents, ctx, min_nr, max_nr, events, timeout, sigmask);
+	return tst_syscall(__NR_io_pgetevents, ctx, min_nr, max_nr, events,
+			   timeout, sigmask);
 }
 #endif /* HAVE_IO_PGETEVENTS */
 #endif /* HAVE_LIBAIO */
-- 
2.21.0.rc0.269.g1a574e7a288b



More information about the ltp mailing list