From 8d5c37dbfdecd75b28800af4b4bf829ad8d2b331 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sat, 28 Apr 2018 20:48:52 +0000 Subject: [PATCH] tests: use sprintrc in mount test * tests/mount.c (main): Use sprintrc. --- tests/mount.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/mount.c b/tests/mount.c index 9bfbc8e5..b96a5679 100644 --- a/tests/mount.c +++ b/tests/mount.c @@ -72,33 +72,33 @@ main(void) static const char data[] = "mount_data"; int rc = mount(source, target, fstype, 15, data); - printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %s\n", source, target, fstype, str_ro_nosuid_nodev_noexec, - data, rc, errno2name()); + data, sprintrc(rc)); rc = mount(source, target, fstype, MS_RELATIME | 15, data); - printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %s\n", source, target, fstype, str_ro_nosuid_nodev_noexec_relatime, - data, rc, errno2name()); + data, sprintrc(rc)); rc = mount(source, target, fstype, MS_MGC_VAL, data); - printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", - source, target, fstype, str_mgc_val, data, rc, errno2name()); + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %s\n", + source, target, fstype, str_mgc_val, data, sprintrc(rc)); rc = mount(source, target, fstype, MS_MGC_VAL | 15, data); - printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %d %s (%m)\n", + printf("mount(\"%s\", \"%s\", \"%s\", %s, \"%s\") = %s\n", source, target, fstype, str_mgc_val "|" str_ro_nosuid_nodev_noexec, - data, rc, errno2name()); + data, sprintrc(rc)); rc = mount(source, target, fstype, MS_REMOUNT, data); - printf("mount(\"%s\", \"%s\", %p, %s, \"%s\") = %d %s (%m)\n", - source, target, fstype, str_remount, data, rc, errno2name()); + printf("mount(\"%s\", \"%s\", %p, %s, \"%s\") = %s\n", + source, target, fstype, str_remount, data, sprintrc(rc)); rc = mount(source, target, fstype, MS_BIND, data); - printf("mount(\"%s\", \"%s\", %p, %s, %p) = %d %s (%m)\n", - source, target, fstype, str_bind, data, rc, errno2name()); + printf("mount(\"%s\", \"%s\", %p, %s, %p) = %s\n", + source, target, fstype, str_bind, data, sprintrc(rc)); puts("+++ exited with 0 +++"); return 0; -- 2.40.0