Commit 94d942c3 by Qiang Huang Committed by Serge Hallyn

lxc_user_nic: remove duplicate code

It's a duplicate of util.h. Signed-off-by: 's avatarQiang Huang <h.huangqiang@huawei.com> Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent 9beb9ce0
...@@ -49,25 +49,6 @@ ...@@ -49,25 +49,6 @@
#include "config.h" #include "config.h"
#include "utils.h" #include "utils.h"
#ifndef HAVE_GETLINE
#ifdef HAVE_FGETLN
#include <../include/getline.h>
#endif
#endif
/* Define setns() if missing from the C library */
#ifndef HAVE_SETNS
static inline int setns(int fd, int nstype)
{
#ifdef __NR_setns
return syscall(__NR_setns, fd, nstype);
#else
errno = ENOSYS;
return -1;
#endif
}
#endif
#if ISTEST #if ISTEST
#define CONF_FILE "/tmp/lxc-usernet" #define CONF_FILE "/tmp/lxc-usernet"
#define DB_FILE "/tmp/nics" #define DB_FILE "/tmp/nics"
...@@ -76,7 +57,6 @@ static inline int setns(int fd, int nstype) ...@@ -76,7 +57,6 @@ static inline int setns(int fd, int nstype)
#define DB_FILE LXC_USERNIC_DB #define DB_FILE LXC_USERNIC_DB
#endif #endif
#include "nl.h" #include "nl.h"
#ifndef IFLA_LINKMODE #ifndef IFLA_LINKMODE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment