From ba93e7b88641d67835b48dea5323aa108b835e76 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 21 Apr 2016 20:39:40 +0000 Subject: [PATCH] tests/fchmod.c: use errno2name --- tests/fchmod.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/fchmod.c b/tests/fchmod.c index d9ef93ed..13fd4d07 100644 --- a/tests/fchmod.c +++ b/tests/fchmod.c @@ -56,15 +56,8 @@ main(void) if (syscall(__NR_fchmod, fd, 0600) != -1) perror_msg_and_fail("fchmod"); - - printf("fchmod(%d, 0600) = -1 EBADF (%m)\n", fd); - } else { - if (errno == ENOSYS) { - printf("fchmod(%d, 0600) = -1 ENOSYS (%m)\n", fd); - } else { - perror_msg_and_fail("fchmod"); - } } + printf("fchmod(%d, 0600) = -1 %s (%m)\n", fd, errno2name()); puts("+++ exited with 0 +++"); return 0; -- 2.40.0