[CRIU] [PATCH] sk-unix: Use pr_warn instead of pr_perror if socket path can't be stat'ed

Cyrill Gorcunov gorcunov at openvz.org
Tue Nov 26 11:25:29 PST 2013


The error message is rather confusing people. In worst case (if
it happened that we need this uncollected socket), criu will
print out real error message later.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 sk-unix.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sk-unix.c b/sk-unix.c
index b6255ba95992..3093badea5ba 100644
--- a/sk-unix.c
+++ b/sk-unix.c
@@ -349,8 +349,8 @@ static int unix_collect_one(const struct unix_diag_msg *m,
 			uv = RTA_DATA(tb[UNIX_DIAG_VFS]);
 			snprintf(rpath, sizeof(rpath), ".%s", name);
 			if (fstatat(mntns_root, rpath, &st, 0)) {
-				pr_perror("Can't stat socket %#x(%s)",
-						m->udiag_ino, rpath);
+				pr_warn("Can't stat socket %#x(%s), skipping: %m\n",
+					m->udiag_ino, rpath);
 				goto skip;
 			}
 
-- 
1.8.3.1



More information about the CRIU mailing list