netns: Rename & move get_netns_fd to lib
Renamed get_netns_fd -> netns_get_fd and moved to
lib/namespace.c
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
diff --git a/ip/iplink.c b/ip/iplink.c
index 2709173..c93d1dc 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -32,6 +32,7 @@
#include "rt_names.h"
#include "utils.h"
#include "ip_common.h"
+#include "namespace.h"
#define IPLINK_IOCTL_COMPAT 1
#ifndef LIBDIR
@@ -440,7 +441,7 @@
NEXT_ARG();
if (netns != -1)
duparg("netns", *argv);
- if ((netns = get_netns_fd(*argv)) >= 0)
+ if ((netns = netns_get_fd(*argv)) >= 0)
addattr_l(&req->n, sizeof(*req), IFLA_NET_NS_FD, &netns, 4);
else if (get_integer(&netns, *argv, 0) == 0)
addattr_l(&req->n, sizeof(*req), IFLA_NET_NS_PID, &netns, 4);