From: Dmitry V. Levin Date: Thu, 21 Apr 2016 20:39:40 +0000 (+0000) Subject: tests/fchmod.c: use errno2name X-Git-Tag: v4.12~355 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ba93e7b88641d67835b48dea5323aa108b835e76;p=strace tests/fchmod.c: use errno2name --- 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;