From 98eeed7194cf2199a2ec659d120728c2d4321aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Date: Mon, 22 May 2023 17:41:56 +0200 Subject: [PATCH] Demote and extend 'TCP repair off' failure log. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The error in tcp_repair_off() is ignored, so log it as a warning. Include the file descriptor and error code in the debug message to make it more useful. Fixes: e7ba90955ce7 (2016-03-14 "cr-check: Inspect errno on syscall failures") Signed-off-by: Michał Mirosław --- criu/include/sk-inet.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/criu/include/sk-inet.h b/criu/include/sk-inet.h index 961d711ee7b..a3e924f6315 100644 --- a/criu/include/sk-inet.h +++ b/criu/include/sk-inet.h @@ -69,6 +69,7 @@ extern int inet_connect(int sk, struct inet_sk_info *); #ifdef CR_NOGLIBC #define setsockopt sys_setsockopt +#define pr_pwarn(fmt, ...) pr_warn(fmt ": %d\n", ##__VA_ARGS__, ret) #endif static inline void tcp_repair_off(int fd) { @@ -76,7 +77,7 @@ static inline void tcp_repair_off(int fd) ret = setsockopt(fd, SOL_TCP, TCP_REPAIR, &aux, sizeof(aux)); if (ret < 0) - pr_err("Failed to turn off repair mode on socket\n"); + pr_pwarn("Failed to turn off repair mode on socket %d", fd); } extern void tcp_locked_conn_add(struct inet_sk_info *);