summaryrefslogtreecommitdiff
path: root/tests/fchmod.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2016-04-21 20:39:40 +0000
committerDmitry V. Levin <ldv@altlinux.org>2016-04-21 20:52:42 +0000
commitba93e7b88641d67835b48dea5323aa108b835e76 (patch)
treef3304681867a2ddb635b2becc0a368c7adc90ae3 /tests/fchmod.c
parenta2633101da248b8d8025c1d1191dcabbbd669826 (diff)
downloadstrace-ba93e7b88641d67835b48dea5323aa108b835e76.tar.gz
tests/fchmod.c: use errno2name
Diffstat (limited to 'tests/fchmod.c')
-rw-r--r--tests/fchmod.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/fchmod.c b/tests/fchmod.c
index d9ef93ed9..13fd4d073 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;