[CRIU] [crtools-bot] parse_pid_stat(): use pr_err()

Cyrill Gorcunov gorcunov at openvz.org
Tue Jan 31 17:55:16 EST 2012


The commit is pushed to "master" and will appear on git://github.com/cyrillos/crtools.git
------>
commit 11f2ce03da2b5da7c03efc00582855a80ba38394
Author: Kir Kolyshkin <kir at openvz.org>
Date:   Wed Feb 1 02:08:18 2012 +0400

    parse_pid_stat(): use pr_err()
    
    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>
    Signed-off-by: Cyrill Gorcunov <gorcunov 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;
 	}
 


More information about the CRIU mailing list