[CRIU] [PATCH 10/11] net: rename pid into nsid for prepare_net_ns()
Andrei Vagin
avagin at openvz.org
Wed Feb 1 16:04:30 PST 2017
From: Andrei Vagin <avagin at virtuozzo.com>
PID ussualy means processs ID, but prepare_net_ns works with namespaces.
Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
---
criu/net.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
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);
--
2.7.4
More information about the CRIU
mailing list