[10/11] net: rename pid into nsid for prepare_net_ns()

Submitted by Andrei Vagin on Feb. 2, 2017, 12:04 a.m.

Details

Message ID 1485993871-3990-11-git-send-email-avagin@openvz.org
State New
Series "Dump and restore nested network namespaces"
Headers show

Commit Message

Andrei Vagin Feb. 2, 2017, 12:04 a.m.
From: Andrei Vagin <avagin@virtuozzo.com>

PID ussualy means processs ID, but prepare_net_ns works with namespaces.

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
---
 criu/net.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/net.c b/criu/net.c
index a7e0a6e..67fed6c 100644
--- a/criu/net.c
+++ b/criu/net.c
@@ -1670,32 +1670,32 @@  int dump_net_ns(int ns_id)
 	return ret;
 }
 
-static int prepare_net_ns(int pid)
+static int prepare_net_ns(int nsid)
 {
 	int ret = 0;
 	NetnsEntry *netns = NULL;
 
 	if (!(opts.empty_ns & CLONE_NEWNET)) {
-		ret = restore_netns_conf(pid, &netns);
+		ret = restore_netns_conf(nsid, &netns);
 		if (!ret)
-			ret = restore_links(pid, &netns);
+			ret = restore_links(nsid, &netns);
 		if (netns)
 			netns_entry__free_unpacked(netns, NULL);
 
 		if (!ret)
-			ret = restore_ifaddr(pid);
+			ret = restore_ifaddr(nsid);
 		if (!ret)
-			ret = restore_route(pid);
+			ret = restore_route(nsid);
 		if (!ret)
-			ret = restore_rule(pid);
+			ret = restore_rule(nsid);
 		if (!ret)
-			ret = restore_iptables(pid);
+			ret = restore_iptables(nsid);
 	}
 
 	if (!ret)
-		ret = restore_nf_ct(pid, CR_FD_NETNF_CT);
+		ret = restore_nf_ct(nsid, CR_FD_NETNF_CT);
 	if (!ret)
-		ret = restore_nf_ct(pid, CR_FD_NETNF_EXP);
+		ret = restore_nf_ct(nsid, CR_FD_NETNF_EXP);
 
 	close_service_fd(NS_FD_OFF);
 

Comments

Pavel Emelianov Feb. 8, 2017, 10 a.m.
Applied