[CRIU] [PATCH v2 3/3] files: change error to warning in linkat_hard error path

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Wed Jan 17 10:56:09 MSK 2018


We print errors in all error cases when calling linkat_hard anyway, but
for some errors like EEXIST we are fine and just skip them, so we should
not print error here.

Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
 criu/files-reg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/files-reg.c b/criu/files-reg.c
index 9c83f2ce4..2402f9340 100644
--- a/criu/files-reg.c
+++ b/criu/files-reg.c
@@ -1402,7 +1402,7 @@ static int linkat_hard(int odir, char *opath, int ndir, char *npath, uid_t uid,
 
 	if (!( (errno == EPERM || errno == EOVERFLOW) && (root_ns_mask & CLONE_NEWUSER) )) {
 		errno_save = errno;
-		pr_perror("Can't link %s -> %s", opath, npath);
+		pr_warn("Can't link %s -> %s", opath, npath);
 		errno = errno_save;
 		return ret;
 	}
-- 
2.14.3



More information about the CRIU mailing list