[lxc-devel] [PATCH 1/2] lxc: fix erroneous includes
Greg Kurz
gkurz at fr.ibm.com
Thu Nov 3 16:41:10 UTC 2011
The "" notation is preferrable if the header file is local.
Signed-off-by: Greg Kurz <gkurz at fr.ibm.com>
---
src/lxc/genl.c | 5 +++--
src/lxc/lxc_info.c | 3 ++-
src/lxc/mainloop.h | 2 +-
src/lxc/network.c | 5 +++--
src/lxc/nl.c | 3 ++-
src/lxc/restart.c | 3 ++-
src/lxc/rtnl.c | 5 +++--
src/lxc/start.c | 5 +++--
8 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/src/lxc/genl.c b/src/lxc/genl.c
index 3781be1..43959ce 100644
--- a/src/lxc/genl.c
+++ b/src/lxc/genl.c
@@ -28,8 +28,9 @@
#include <unistd.h>
#include <linux/genetlink.h>
#include <linux/rtnetlink.h>
-#include <nl.h>
-#include <genl.h>
+
+#include "nl.h"
+#include "genl.h"
static int genetlink_resolve_family(const char *family)
{
diff --git a/src/lxc/lxc_info.c b/src/lxc/lxc_info.c
index 74b6b59..809769e 100644
--- a/src/lxc/lxc_info.c
+++ b/src/lxc/lxc_info.c
@@ -28,7 +28,8 @@
#include <lxc/lxc.h>
#include <lxc/log.h>
-#include <commands.h>
+
+#include "commands.h"
#include "arguments.h"
static bool state;
diff --git a/src/lxc/mainloop.h b/src/lxc/mainloop.h
index deeff23..09e5033 100644
--- a/src/lxc/mainloop.h
+++ b/src/lxc/mainloop.h
@@ -21,7 +21,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <list.h>
+#include "list.h"
struct lxc_epoll_descr {
int epfd;
diff --git a/src/lxc/network.c b/src/lxc/network.c
index 5110ca7..214460b 100644
--- a/src/lxc/network.c
+++ b/src/lxc/network.c
@@ -44,8 +44,9 @@
#include <linux/rtnetlink.h>
#include <linux/sockios.h>
#include <linux/if_bridge.h>
-#include <nl.h>
-#include <network.h>
+
+#include "nl.h"
+#include "network.h"
#ifndef IFLA_LINKMODE
# define IFLA_LINKMODE 17
diff --git a/src/lxc/nl.c b/src/lxc/nl.c
index 236cfcb..6294442 100644
--- a/src/lxc/nl.c
+++ b/src/lxc/nl.c
@@ -29,7 +29,8 @@
#include <stdlib.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
-#include <nl.h>
+
+#include "nl.h"
#define NLMSG_TAIL(nmsg) \
((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
diff --git a/src/lxc/restart.c b/src/lxc/restart.c
index c947b81..a19b948 100644
--- a/src/lxc/restart.c
+++ b/src/lxc/restart.c
@@ -21,7 +21,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "../config.h"
+#include "config.h"
+
#include <stdio.h>
#undef _GNU_SOURCE
#include <string.h>
diff --git a/src/lxc/rtnl.c b/src/lxc/rtnl.c
index bc23542..ec1eff2 100644
--- a/src/lxc/rtnl.c
+++ b/src/lxc/rtnl.c
@@ -28,8 +28,9 @@
#include <unistd.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
-#include <nl.h>
-#include <rtnl.h>
+
+#include "nl.h"
+#include "rtnl.h"
extern int rtnetlink_open(struct rtnl_handler *handler)
{
diff --git a/src/lxc/start.c b/src/lxc/start.c
index 9481a8a..334262d 100644
--- a/src/lxc/start.c
+++ b/src/lxc/start.c
@@ -21,7 +21,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "../config.h"
+#include "config.h"
+
#include <stdio.h>
#undef _GNU_SOURCE
#include <string.h>
@@ -32,7 +33,6 @@
#include <signal.h>
#include <fcntl.h>
#include <termios.h>
-#include <namespace.h>
#include <sys/param.h>
#include <sys/file.h>
#include <sys/mount.h>
@@ -125,6 +125,7 @@ int signalfd(int fd, const sigset_t *mask, int flags)
#include "commands.h"
#include "console.h"
#include "sync.h"
+#include "namespace.h"
lxc_log_define(lxc_start, lxc);
More information about the lxc-devel
mailing list