[CRIU] [crtools-bot] Remove duplicate strerror(errno) printing

Cyrill Gorcunov gorcunov at openvz.org
Mon Jan 30 12:29:51 EST 2012


The commit is pushed to "master" and will appear on git://github.com/cyrillos/crtools.git
------>
commit b8b0dd42a711f27a6560fd128457f08da6d140bd
Author: Kir Kolyshkin <kir at openvz.org>
Date:   Mon Jan 30 21:18:38 2012 +0400

    Remove duplicate strerror(errno) printing
    
    Function pr_perror() already spits out strerror(errno), no need to do it
    in the calling code.
    
    Signed-off-by: Kir Kolyshkin <kir at openvz.org>
    Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 crtools.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/crtools.c b/crtools.c
index 957acbc..926d26b 100644
--- a/crtools.c
+++ b/crtools.c
@@ -148,13 +148,13 @@ struct cr_fdset *cr_fdset_open(int pid, unsigned long use_mask, struct cr_fdset
 
 		ret = unlink(path);
 		if (ret && errno != ENOENT) {
-			pr_perror("Unable to unlink %s (%s)\n", path, strerror(errno));
+			pr_perror("Unable to unlink %s\n", path);
 			goto err;
 		}
 
 		ret = open(path, O_RDWR | O_CREAT | O_EXCL, CR_FD_PERM);
 		if (ret < 0) {
-			pr_perror("Unable to open %s (%s)\n", path, strerror(errno));
+			pr_perror("Unable to open %s\n", path);
 			goto err;
 		}
 
@@ -191,7 +191,7 @@ struct cr_fdset *prep_cr_fdset_for_restore(int pid, unsigned long use_mask)
 
 		ret = open(path, O_RDWR, CR_FD_PERM);
 		if (ret < 0) {
-			pr_perror("Unable to open %s (%s)\n", path, strerror(errno));
+			pr_perror("Unable to open %s\n", path);
 			goto err;
 		}
 


More information about the CRIU mailing list