mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-14 17:12:14 +00:00
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:
parent
9beb9ce0ef
commit
94d942c3d2
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user