lxc_user_nic: remove duplicate code

It's a duplicate of util.h.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
Qiang Huang 2013-11-08 10:54:18 +08:00 committed by Serge Hallyn
parent 9beb9ce0ef
commit 94d942c3d2

View File

@ -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)
#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