tests/iopl.c: use errno2name

This commit is contained in:
Дмитрий Левин 2016-04-21 20:59:46 +00:00
parent c1dbe052f1
commit 33e0df7074

View File

@ -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;