]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc_user_nic: remove duplicate code
authorQiang Huang <h.huangqiang@huawei.com>
Fri, 8 Nov 2013 02:54:18 +0000 (10:54 +0800)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Fri, 8 Nov 2013 04:25:26 +0000 (22:25 -0600)
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>
src/lxc/lxc_user_nic.c

index dc35e55d2722e9bff923f9a37c4f8e90a46d24cb..e4f59faeba10c59f2d2b5167d1c5d993db3cd0aa 100644 (file)
 #include "config.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
 #define CONF_FILE "/tmp/lxc-usernet"
 #define DB_FILE "/tmp/nics"
@@ -76,7 +57,6 @@ static inline int setns(int fd, int nstype)
 #define DB_FILE LXC_USERNIC_DB
 #endif
 
-
 #include "nl.h"
 
 #ifndef IFLA_LINKMODE