[CRIU] [PATCH 3/3] parse_pid_stat(): use pr_err()

Kir Kolyshkin kir at openvz.org
Tue Jan 31 17:08:18 EST 2012


We do not want to use pr_perror() here, because

1. fscanf only sets errno in case it returns EOF
2. we are not really interested in errno value

So use pr_err() instead.

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 proc_parse.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/proc_parse.c b/proc_parse.c
index d42a331..b82b0fe 100644
--- a/proc_parse.c
+++ b/proc_parse.c
@@ -247,7 +247,7 @@ int parse_pid_stat(pid_t pid, int pid_dir, struct proc_pid_stat *s)
 		&s->exit_code);
 
 	if (n < 52) {
-		pr_perror("Parsing %d's stat failed (#fields do not match)", pid);
+		pr_err("Parsing %d's stat failed (#fields do not match)\n", pid);
 		return -1;
 	}
 
-- 
1.7.5.4



More information about the CRIU mailing list