From: Dmitry V. Levin Date: Thu, 21 Apr 2016 20:59:46 +0000 (+0000) Subject: tests/iopl.c: use errno2name X-Git-Tag: v4.12~344 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33e0df7074ac4b9c304db3b108a0b41cd9955061;p=strace tests/iopl.c: use errno2name --- diff --git a/tests/iopl.c b/tests/iopl.c index 3d379d42..a3e98272 100644 --- a/tests/iopl.c +++ b/tests/iopl.c @@ -11,18 +11,7 @@ int main(void) { long rc = syscall(__NR_iopl, 4); - const char *error_text; - switch (errno) { - case ENOSYS: - error_text = "ENOSYS"; - break; - case EPERM: - error_text = "EPERM"; - break; - default: - error_text = "EINVAL"; - } - printf("iopl(4) = %ld %s (%m)\n", rc, error_text); + printf("iopl(4) = %ld %s (%m)\n", rc, errno2name()); puts("+++ exited with 0 +++"); return 0;