From ce98c7b2977cbc6c97983e729ffc1f332bf041b1 Mon Sep 17 00:00:00 2001 From: Eugene Syromyatnikov Date: Wed, 10 Jan 2018 05:30:27 +0100 Subject: [PATCH] tests: use sprintrc in reboot.test * test/reboot.c (main): Use sprintrc instead of old-style manual printing of return code. --- tests/reboot.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/reboot.c b/tests/reboot.c index ce651dc7..1699de0f 100644 --- a/tests/reboot.c +++ b/tests/reboot.c @@ -17,14 +17,14 @@ main(void) long rc = syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, INVALID_MAGIC, LINUX_REBOOT_CMD_RESTART2, buf); printf("reboot(LINUX_REBOOT_MAGIC1, %#x /* LINUX_REBOOT_MAGIC_??? */," - " LINUX_REBOOT_CMD_RESTART2, \"%s\") = %ld %s (%m)\n", - INVALID_MAGIC, buf, rc, errno2name()); + " LINUX_REBOOT_CMD_RESTART2, \"%s\") = %s\n", + INVALID_MAGIC, buf, sprintrc(rc)); rc = syscall(__NR_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, INVALID_CMD); printf("reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2," - " %#x /* LINUX_REBOOT_CMD_??? */) = %ld %s (%m)\n", - INVALID_CMD, rc, errno2name()); + " %#x /* LINUX_REBOOT_CMD_??? */) = %s\n", + INVALID_CMD, sprintrc(rc)); puts("+++ exited with 0 +++"); return 0; -- 2.40.0