public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH] test/statx: test for ENOSYS in statx_syscall_supported
@ 2020-07-10 14:27 Tobias Klauser
  0 siblings, 0 replies; only message in thread
From: Tobias Klauser @ 2020-07-10 14:27 UTC (permalink / raw)
  To: io-uring

errno will be ENOSYS, not EOPNOTSUPP if the syscall is not there. This
also matches what errno is set to in do_statx if __NR_statx is not
defined.

Signed-off-by: Tobias Klauser <[email protected]>
---
 test/statx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test/statx.c b/test/statx.c
index 66f333f93cf9..c846a4ad5b9f 100644
--- a/test/statx.c
+++ b/test/statx.c
@@ -51,7 +51,7 @@ static int create_file(const char *file, size_t size)
 
 static int statx_syscall_supported(void)
 {
-	return errno == EOPNOTSUPP ? 0 : -1;
+	return errno == ENOSYS ? 0 : -1;
 }
 
 static int test_statx(struct io_uring *ring, const char *path)
-- 
2.27.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-10 14:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-10 14:27 [PATCH] test/statx: test for ENOSYS in statx_syscall_supported Tobias Klauser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox