mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
inet: Improve messaging in can_dump_inet_sk error paths
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
17
sk-inet.c
17
sk-inet.c
@@ -93,13 +93,15 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
|
||||
BUG_ON((sk->sd.family != AF_INET) && (sk->sd.family != AF_INET6));
|
||||
|
||||
if (sk->shutdown) {
|
||||
pr_err("Can't dump shutdown inet socket\n");
|
||||
pr_err("Can't dump shutdown inet socket %x\n",
|
||||
sk->sd.ino);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (sk->type == SOCK_DGRAM) {
|
||||
if (sk->wqlen != 0) {
|
||||
pr_err("Can't dump corked dgram socket\n");
|
||||
pr_err("Can't dump corked dgram socket %x\n",
|
||||
sk->sd.ino);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -111,7 +113,9 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
|
||||
}
|
||||
|
||||
if (sk->type != SOCK_STREAM) {
|
||||
pr_err("Only stream and dgram inet sockets for now\n");
|
||||
pr_err("Can't dump %d inet socket %x. "
|
||||
"Only can stream and dgram.\n",
|
||||
sk->type, sk->sd.ino);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -123,7 +127,8 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
|
||||
* requests for listen sockets. Need to pick
|
||||
* those up and fix the connect job respectively
|
||||
*/
|
||||
pr_err("In-flight connection (l)\n");
|
||||
pr_err("In-flight connection (l) for %x\n",
|
||||
sk->sd.ino);
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
@@ -138,7 +143,7 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
|
||||
/* Trivial case, we just need to create a socket on restore */
|
||||
break;
|
||||
default:
|
||||
pr_err("Unknown state %d\n", sk->state);
|
||||
pr_err("Unknown inet socket %x state %d\n", sk->sd.ino, sk->state);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -150,7 +155,7 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk, int proto)
|
||||
case IPPROTO_UDPLITE:
|
||||
break;
|
||||
default:
|
||||
pr_err("Unsupported socket proto %d\n", proto);
|
||||
pr_err("Unsupported proto %d for socket %x\n", proto, sk->sd.ino);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user