[LTP] [PATCH 11/13]Fix the wrong using of perror()

tangchen
2011-01-06T11:08:58Z

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
---
.../syscalls/sched_setparam/sched_setparam03.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/syscalls/sched_setparam/sched_setparam03.c
b/testcases/kernel/syscalls/sched_setparam/sched_setparam03.c
index eb70588..16f3d3a 100644
--- a/testcases/kernel/syscalls/sched_setparam/sched_setparam03.c
+++ b/testcases/kernel/syscalls/sched_setparam/sched_setparam03.c
@@ -121,7 +121,8 @@ int main(int ac, char **av)
TEST(sched_setparam(getppid(), &param));

if (TEST_RETURN == -1) {
- perror("sched_setparam returned %ld", TEST_RETURN);
+ fprintf(stderr, "sched_setparam returned %ld: "
+ "%s\n", TEST_RETURN, strerror(errno));
exit(0);
}
exit(1);
@@ -201,4 +202,5 @@ int verify_priority()

tst_resm(TWARN, "sched_getparam() failed");
return 0;
-}
\ No newline at end of file
+}
+
--
1.7.0.4

--
Best Regards,
Tang chen