[CRIU] [PATCH] net: Print link name when restore it

Cyrill Gorcunov gorcunov at openvz.org
Wed Sep 18 06:08:09 EDT 2013


For debug purpose.

 | (00.013002)      1: Restoring link lo type 1
 | (00.013002)      1: Restoring netdev lo idx 1
 | (00.015002)      1: Restoring link venet0 type 4
 | (00.015002)      1: Restoring link eth0 type 2
 | (00.015002)      1: Restoring netdev eth0 idx 3

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

diff --git a/net.c b/net.c
index dd2460c..fadf52b 100644
--- a/net.c
+++ b/net.c
@@ -280,7 +280,7 @@ int restore_link_parms(NetDeviceEntry *nde, int nlsk)
 static int restore_one_link(NetDeviceEntry *nde, int nlsk,
 		int (*link_info)(NetDeviceEntry *, struct newlink_req *))
 {
-	pr_info("Restoring netdev idx %d\n", nde->ifindex);
+	pr_info("Restoring netdev %s idx %d\n", nde->name, nde->ifindex);
 	return do_rtm_link_req(RTM_NEWLINK, nde, nlsk, link_info);
 }
 
@@ -328,7 +328,7 @@ static int veth_link_info(NetDeviceEntry *nde, struct newlink_req *req)
 
 static int restore_link(NetDeviceEntry *nde, int nlsk)
 {
-	pr_info("Restoring link type %d\n", nde->type);
+	pr_info("Restoring link %s type %d\n", nde->name, nde->type);
 
 	switch (nde->type) {
 	case ND_TYPE__LOOPBACK:
-- 
1.8.1.4



More information about the CRIU mailing list