2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 01:51:51 +00:00

sk-inet: Extend 'TCP repair off' failure log.

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 <emmir@google.com>
This commit is contained in:
Michał Mirosław 2023-05-22 17:41:56 +02:00 committed by Andrei Vagin
parent 25d0330809
commit ac1219f4ee

View File

@ -69,6 +69,7 @@ extern int inet_connect(int sk, struct inet_sk_info *);
#ifdef CR_NOGLIBC #ifdef CR_NOGLIBC
#define setsockopt sys_setsockopt #define setsockopt sys_setsockopt
#define pr_perror(fmt, ...) pr_err(fmt ": errno %d\n", ##__VA_ARGS__, -ret)
#endif #endif
static inline void tcp_repair_off(int fd) 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)); ret = setsockopt(fd, SOL_TCP, TCP_REPAIR, &aux, sizeof(aux));
if (ret < 0) if (ret < 0)
pr_err("Failed to turn off repair mode on socket\n"); pr_perror("Failed to turn off repair mode on socket %d", fd);
} }
extern void tcp_locked_conn_add(struct inet_sk_info *); extern void tcp_locked_conn_add(struct inet_sk_info *);