[lxc-devel] [PATCH] [cosmetic] adjust include statements (v2)
Serge Hallyn
serge.hallyn at ubuntu.com
Wed Jan 1 20:30:21 UTC 2014
Quoting S.Çağlar Onur (caglar at 10ur.org):
> Hey Serge,
>
> On Wed, Jan 1, 2014 at 3:04 PM, Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> > Quoting S.Çağlar Onur (caglar at 10ur.org):
> >> Use "#include <somefile.h>" style for external or exported headers only.
> >>
> >> changes since v1:
> >> - adjusted formatting as Stéphane suggested
> >>
> >> Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>
> >
> > I'm not sure why you made an exception for <lxc/lxccontainer.h>,
> > but no big deal.
>
> That was Stéphane's suggestion (assuming I didn't misunderstand),
>
> http://lists.linuxcontainers.org/pipermail/lxc-devel/2013-December/006705.html
I don't get it. Stéphane, why do you want lxccontainers.h in
lxc_autostart.c in the above link to come from <lxc/lxccontainers.h>
instead of "lxccontainers.h"? In your argument further up I thought
you meant the #includes *in* those .h files would use <lxc/>, not
the includes *of* those .h files.
> > Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
(applied, btw)
> >
> >> ---
> >> src/lua-lxc/core.c | 2 +-
> >> src/lxc/attach.h | 2 +-
> >> src/lxc/bdev.c | 1 +
> >> src/lxc/cgroup.c | 7 +++----
> >> src/lxc/checkpoint.c | 4 ++--
> >> src/lxc/commands.c | 13 ++++++-------
> >> src/lxc/conf.h | 5 ++---
> >> src/lxc/confile.c | 5 ++---
> >> src/lxc/confile.h | 2 +-
> >> src/lxc/console.c | 1 +
> >> src/lxc/error.c | 1 +
> >> src/lxc/freezer.c | 5 ++---
> >> src/lxc/lsm/apparmor.c | 1 +
> >> src/lxc/lsm/selinux.c | 1 +
> >> src/lxc/lxc.h | 2 +-
> >> src/lxc/lxc_cgroup.c | 6 +++---
> >> src/lxc/lxc_checkpoint.c | 7 +++----
> >> src/lxc/lxc_clone.c | 3 ++-
> >> src/lxc/lxc_config.c | 4 +++-
> >> src/lxc/lxc_console.c | 1 +
> >> src/lxc/lxc_create.c | 7 +++----
> >> src/lxc/lxc_destroy.c | 5 ++---
> >> src/lxc/lxc_freeze.c | 5 +++--
> >> src/lxc/lxc_info.c | 6 +++---
> >> src/lxc/lxc_kill.c | 1 +
> >> src/lxc/lxc_monitor.c | 6 +++---
> >> src/lxc/lxc_monitord.c | 10 +++++-----
> >> src/lxc/lxc_snapshot.c | 9 ++++-----
> >> src/lxc/lxc_start.c | 3 ++-
> >> src/lxc/lxc_stop.c | 6 +++---
> >> src/lxc/lxc_unfreeze.c | 4 ++--
> >> src/lxc/lxc_user_nic.c | 1 +
> >> src/lxc/lxc_usernsexec.c | 1 +
> >> src/lxc/lxc_wait.c | 5 +++--
> >> src/lxc/lxccontainer.c | 18 ++++++++++--------
> >> src/lxc/lxccontainer.h | 3 ++-
> >> src/lxc/lxclock.c | 6 ++++--
> >> src/lxc/monitor.c | 11 +++++------
> >> src/lxc/monitor.h | 2 +-
> >> src/lxc/parse.c | 2 +-
> >> src/lxc/restart.c | 8 ++++----
> >> src/lxc/seccomp.c | 2 +-
> >> src/lxc/start.h | 6 +++---
> >> src/lxc/state.c | 10 +++++-----
> >> src/lxc/utils.h | 1 +
> >> src/python-lxc/lxc.c | 6 +++---
> >> src/tests/attach.c | 4 ++--
> >> src/tests/cgpath.c | 6 +++---
> >> src/tests/containertests.c | 2 +-
> >> src/tests/get_item.c | 2 +-
> >> src/tests/getkeys.c | 2 +-
> >> src/tests/locktests.c | 2 +-
> >> src/tests/reboot.c | 2 +-
> >> src/tests/snapshot.c | 2 +-
> >> 54 files changed, 125 insertions(+), 114 deletions(-)
> >>
> >> diff --git a/src/lua-lxc/core.c b/src/lua-lxc/core.c
> >> index 8904ffc..aa5831c 100644
> >> --- a/src/lua-lxc/core.c
> >> +++ b/src/lua-lxc/core.c
> >> @@ -30,7 +30,7 @@
> >> #include <unistd.h>
> >> #include <libgen.h>
> >> #include <lxc/lxccontainer.h>
> >> -#include <lxc/commands.h>
> >> +#include "lxc/commands.h"
> >>
> >> #if LUA_VERSION_NUM < 502
> >> #define luaL_newlib(L,l) (lua_newtable(L), luaL_register(L,NULL,l))
> >> diff --git a/src/lxc/attach.h b/src/lxc/attach.h
> >> index b5f3ea1..22e6932 100644
> >> --- a/src/lxc/attach.h
> >> +++ b/src/lxc/attach.h
> >> @@ -25,7 +25,7 @@
> >> #define _attach_h
> >>
> >> #include <sys/types.h>
> >> -#include "attach_options.h"
> >> +#include <lxc/attach_options.h>
> >>
> >> struct lxc_proc_context_info {
> >> char *lsm_label;
> >> diff --git a/src/lxc/bdev.c b/src/lxc/bdev.c
> >> index b737eff..29e2ad5 100644
> >> --- a/src/lxc/bdev.c
> >> +++ b/src/lxc/bdev.c
> >> @@ -37,6 +37,7 @@
> >> #include <libgen.h>
> >> #include <linux/loop.h>
> >> #include <dirent.h>
> >> +
> >> #include "lxc.h"
> >> #include "config.h"
> >> #include "conf.h"
> >> diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c
> >> index ce6b739..946ab0e 100644
> >> --- a/src/lxc/cgroup.c
> >> +++ b/src/lxc/cgroup.c
> >> @@ -45,10 +45,9 @@
> >> #include "conf.h"
> >> #include "utils.h"
> >> #include "bdev.h"
> >> -
> >> -#include <lxc/log.h>
> >> -#include <lxc/cgroup.h>
> >> -#include <lxc/start.h>
> >> +#include "log.h"
> >> +#include "cgroup.h"
> >> +#include "start.h"
> >>
> >> #if IS_BIONIC
> >> #include <../include/lxcmntent.h>
> >> diff --git a/src/lxc/checkpoint.c b/src/lxc/checkpoint.c
> >> index 75834c9..b50273a 100644
> >> --- a/src/lxc/checkpoint.c
> >> +++ b/src/lxc/checkpoint.c
> >> @@ -20,8 +20,8 @@
> >> * License along with this library; if not, write to the Free Software
> >> * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> >> */
> >> -#include <lxc/lxc.h>
> >> -#include <lxc/log.h>
> >> +#include "lxc.h"
> >> +#include "log.h"
> >>
> >> lxc_log_define(lxc_checkpoint, lxc);
> >>
> >> diff --git a/src/lxc/commands.c b/src/lxc/commands.c
> >> index 19a416f..73933ca 100644
> >> --- a/src/lxc/commands.c
> >> +++ b/src/lxc/commands.c
> >> @@ -33,13 +33,12 @@
> >> #include <malloc.h>
> >> #include <stdlib.h>
> >>
> >> -#include <lxc/log.h>
> >> -#include <lxc/lxc.h>
> >> -#include <lxc/conf.h>
> >> -#include <lxc/start.h> /* for struct lxc_handler */
> >> -#include <lxc/utils.h>
> >> -#include <lxc/cgroup.h>
> >> -
> >> +#include "log.h"
> >> +#include "lxc.h"
> >> +#include "conf.h"
> >> +#include "start.h" /* for struct lxc_handler */
> >> +#include "utils.h"
> >> +#include "cgroup.h"
> >> #include "commands.h"
> >> #include "console.h"
> >> #include "confile.h"
> >> diff --git a/src/lxc/conf.h b/src/lxc/conf.h
> >> index ec76295..9becc63 100644
> >> --- a/src/lxc/conf.h
> >> +++ b/src/lxc/conf.h
> >> @@ -31,9 +31,8 @@
> >> #include <sys/types.h>
> >> #include <stdbool.h>
> >>
> >> -#include <lxc/list.h>
> >> -
> >> -#include <lxc/start.h> /* for lxc_handler */
> >> +#include "list.h"
> >> +#include "start.h" /* for lxc_handler */
> >>
> >> #if HAVE_SCMP_FILTER_CTX
> >> typedef void * scmp_filter_ctx;
> >> diff --git a/src/lxc/confile.c b/src/lxc/confile.c
> >> index c5ec4f3..ad694e8 100644
> >> --- a/src/lxc/confile.c
> >> +++ b/src/lxc/confile.c
> >> @@ -41,9 +41,8 @@
> >> #include "config.h"
> >> #include "confile.h"
> >> #include "utils.h"
> >> -
> >> -#include <lxc/log.h>
> >> -#include <lxc/conf.h>
> >> +#include "log.h"
> >> +#include "conf.h"
> >> #include "network.h"
> >>
> >> #if HAVE_SYS_PERSONALITY_H
> >> diff --git a/src/lxc/confile.h b/src/lxc/confile.h
> >> index eb7a8c2..a16c9fd 100644
> >> --- a/src/lxc/confile.h
> >> +++ b/src/lxc/confile.h
> >> @@ -22,7 +22,7 @@
> >> */
> >>
> >> #include <stdio.h>
> >> -#include "attach_options.h"
> >> +#include <lxc/attach_options.h>
> >>
> >> #ifndef _confile_h
> >> #define _confile_h
> >> diff --git a/src/lxc/console.c b/src/lxc/console.c
> >> index 86e5e05..55e895c 100644
> >> --- a/src/lxc/console.c
> >> +++ b/src/lxc/console.c
> >> @@ -32,6 +32,7 @@
> >> #include <termios.h>
> >>
> >> #include <lxc/lxccontainer.h>
> >> +
> >> #include "log.h"
> >> #include "conf.h"
> >> #include "config.h"
> >> diff --git a/src/lxc/error.c b/src/lxc/error.c
> >> index 46c34bb..f433bf9 100644
> >> --- a/src/lxc/error.c
> >> +++ b/src/lxc/error.c
> >> @@ -24,6 +24,7 @@
> >> #include <stdio.h>
> >> #include <stdlib.h>
> >> #include <sys/wait.h>
> >> +
> >> #include "error.h"
> >> #include "log.h"
> >>
> >> diff --git a/src/lxc/freezer.c b/src/lxc/freezer.c
> >> index be97d75..7b9f45f 100644
> >> --- a/src/lxc/freezer.c
> >> +++ b/src/lxc/freezer.c
> >> @@ -34,9 +34,8 @@
> >> #include "error.h"
> >> #include "state.h"
> >> #include "monitor.h"
> >> -
> >> -#include <lxc/log.h>
> >> -#include <lxc/cgroup.h>
> >> +#include "log.h"
> >> +#include "cgroup.h"
> >>
> >> lxc_log_define(lxc_freezer, lxc);
> >>
> >> diff --git a/src/lxc/lsm/apparmor.c b/src/lxc/lsm/apparmor.c
> >> index fdae5e6..be89987 100644
> >> --- a/src/lxc/lsm/apparmor.c
> >> +++ b/src/lxc/lsm/apparmor.c
> >> @@ -26,6 +26,7 @@
> >> #include <sys/stat.h>
> >> #include <sys/mount.h>
> >> #include <sys/apparmor.h>
> >> +
> >> #include "log.h"
> >> #include "lsm/lsm.h"
> >>
> >> diff --git a/src/lxc/lsm/selinux.c b/src/lxc/lsm/selinux.c
> >> index b1b0253..11620c9 100644
> >> --- a/src/lxc/lsm/selinux.c
> >> +++ b/src/lxc/lsm/selinux.c
> >> @@ -25,6 +25,7 @@
> >> #include <sys/types.h>
> >> #include <unistd.h>
> >> #include <selinux/selinux.h>
> >> +
> >> #include "log.h"
> >> #include "lsm/lsm.h"
> >>
> >> diff --git a/src/lxc/lxc.h b/src/lxc/lxc.h
> >> index 84bcc04..d048cf2 100644
> >> --- a/src/lxc/lxc.h
> >> +++ b/src/lxc/lxc.h
> >> @@ -30,7 +30,7 @@ extern "C" {
> >> #include <stddef.h>
> >> #include <sys/select.h>
> >> #include <sys/types.h>
> >> -#include <lxc/state.h>
> >> +#include "state.h"
> >>
> >> struct lxc_msg;
> >> struct lxc_conf;
> >> diff --git a/src/lxc/lxc_cgroup.c b/src/lxc/lxc_cgroup.c
> >> index 7c26fc6..7998f1c 100644
> >> --- a/src/lxc/lxc_cgroup.c
> >> +++ b/src/lxc/lxc_cgroup.c
> >> @@ -26,10 +26,10 @@
> >> #include <libgen.h>
> >> #include <sys/types.h>
> >>
> >> -#include <lxc/lxc.h>
> >> -#include <lxc/log.h>
> >> -
> >> #include <lxc/lxccontainer.h>
> >> +
> >> +#include "lxc.h"
> >> +#include "log.h"
> >> #include "arguments.h"
> >>
> >> lxc_log_define(lxc_cgroup_ui, lxc_cgroup);
> >> diff --git a/src/lxc/lxc_checkpoint.c b/src/lxc/lxc_checkpoint.c
> >> index f6a0313..7f7d53e 100644
> >> --- a/src/lxc/lxc_checkpoint.c
> >> +++ b/src/lxc/lxc_checkpoint.c
> >> @@ -30,10 +30,9 @@
> >> #include <sys/types.h>
> >> #include <fcntl.h>
> >>
> >> -#include <lxc/lxc.h>
> >> -#include <lxc/log.h>
> >> -#include <lxc/utils.h>
> >> -
> >> +#include "lxc.h"
> >> +#include "log.h"
> >> +#include "utils.h"
> >> #include "arguments.h"
> >> #include "config.h"
> >> #include "caps.h"
> >> diff --git a/src/lxc/lxc_clone.c b/src/lxc/lxc_clone.c
> >> index 7464dcd..3354809 100644
> >> --- a/src/lxc/lxc_clone.c
> >> +++ b/src/lxc/lxc_clone.c
> >> @@ -27,12 +27,13 @@
> >> #include <errno.h>
> >> #include <ctype.h>
> >>
> >> +#include <lxc/lxccontainer.h>
> >> +
> >> #include "log.h"
> >> #include "config.h"
> >> #include "lxc.h"
> >> #include "conf.h"
> >> #include "state.h"
> >> -#include <lxc/lxccontainer.h>
> >>
> >> lxc_log_define(lxc_clone, lxc);
> >>
> >> diff --git a/src/lxc/lxc_config.c b/src/lxc/lxc_config.c
> >> index 8a4114d..f137498 100644
> >> --- a/src/lxc/lxc_config.c
> >> +++ b/src/lxc/lxc_config.c
> >> @@ -20,9 +20,11 @@
> >>
> >> #include <stdio.h>
> >> #include <string.h>
> >> -#include "config.h"
> >> +
> >> #include <lxc/lxccontainer.h>
> >>
> >> +#include "config.h"
> >> +
> >> struct lxc_config_items {
> >> char *name;
> >> const char *(*fn)(void);
> >> diff --git a/src/lxc/lxc_console.c b/src/lxc/lxc_console.c
> >> index 5dc3d49..e6a5a7e 100644
> >> --- a/src/lxc/lxc_console.c
> >> +++ b/src/lxc/lxc_console.c
> >> @@ -39,6 +39,7 @@
> >> #include <sys/ioctl.h>
> >>
> >> #include <lxc/lxccontainer.h>
> >> +
> >> #include "error.h"
> >> #include "lxc.h"
> >> #include "log.h"
> >> diff --git a/src/lxc/lxc_create.c b/src/lxc/lxc_create.c
> >> index 7399683..5ec7fc3 100644
> >> --- a/src/lxc/lxc_create.c
> >> +++ b/src/lxc/lxc_create.c
> >> @@ -26,10 +26,9 @@
> >> #include <fcntl.h>
> >> #include <sys/types.h>
> >>
> >> -#include <lxc/lxc.h>
> >> -#include <lxc/log.h>
> >> -#include <lxc/bdev.h>
> >> -
> >> +#include "lxc.h"
> >> +#include "log.h"
> >> +#include "bdev.h"
> >> #include "arguments.h"
> >> #include "utils.h"
> >>
> >> diff --git a/src/lxc/lxc_destroy.c b/src/lxc/lxc_destroy.c
> >> index 06d2d0d..729d352 100644
> >> --- a/src/lxc/lxc_destroy.c
> >> +++ b/src/lxc/lxc_destroy.c
> >> @@ -24,9 +24,8 @@
> >> #include <unistd.h>
> >> #include <sys/types.h>
> >>
> >> -#include <lxc/lxc.h>
> >> -#include <lxc/log.h>
> >> -
> >> +#include "lxc.h"
> >> +#include "log.h"
> >> #include "arguments.h"
> >> #include "utils.h"
> >>
> >> diff --git a/src/lxc/lxc_freeze.c b/src/lxc/lxc_freeze.c
> >> index 9e783bd..086c81c 100644
> >> --- a/src/lxc/lxc_freeze.c
> >> +++ b/src/lxc/lxc_freeze.c
> >> @@ -26,10 +26,11 @@
> >> #include <libgen.h>
> >> #include <string.h>
> >>
> >> -#include <lxc/lxc.h>
> >> -#include <lxc/log.h>
> >> #include <lxc/lxccontainer.h>
> >>
> >> +#include "lxc.h"
> >> +#include "log.h"
> >> +
> >> #include "arguments.h"
> >>
> >> lxc_log_define(lxc_freeze_ui, lxc_cgroup);
> >> diff --git a/src/lxc/lxc_info.c b/src/lxc/lxc_info.c
> >> index b344dca..9869881 100644
> >> --- a/src/lxc/lxc_info.c
> >> +++ b/src/lxc/lxc_info.c
> >> @@ -29,11 +29,11 @@
> >> #include <libgen.h>
> >> #include <sys/types.h>
> >>
> >> -#include <lxc/lxc.h>
> >> -#include <lxc/log.h>
> >> -#include <lxc/utils.h>
> >> #include <lxc/lxccontainer.h>
> >>
> >> +#include "lxc.h"
> >> +#include "log.h"
> >> +#include "utils.h"
> >> #include "commands.h"
> >> #include "arguments.h"
> >>
> >> diff --git a/src/lxc/lxc_kill.c b/src/lxc/lxc_kill.c
> >> index 8322b42..62c76bd 100644
> >> --- a/src/lxc/lxc_kill.c
> >> +++ b/src/lxc/lxc_kill.c
> >> @@ -26,6 +26,7 @@
> >> #include <sys/param.h>
> >> #include <stdlib.h>
> >> #include <signal.h>
> >> +
> >> #include "commands.h"
> >> #include "arguments.h"
> >> #include "namespace.h"
> >> diff --git a/src/lxc/lxc_monitor.c b/src/lxc/lxc_monitor.c
> >> index be381b0..52f4c98 100644
> >> --- a/src/lxc/lxc_monitor.c
> >> +++ b/src/lxc/lxc_monitor.c
> >> @@ -29,9 +29,9 @@
> >> #include <sys/types.h>
> >> #include <errno.h>
> >>
> >> -#include <lxc/lxc.h>
> >> -#include <lxc/log.h>
> >> -#include <lxc/monitor.h>
> >> +#include "lxc.h"
> >> +#include "log.h"
> >> +#include "monitor.h"
> >> #include "arguments.h"
> >>
> >> lxc_log_define(lxc_monitor_ui, lxc_monitor);
> >> diff --git a/src/lxc/lxc_monitord.c b/src/lxc/lxc_monitord.c
> >> index fc83f01..84e0239 100644
> >> --- a/src/lxc/lxc_monitord.c
> >> +++ b/src/lxc/lxc_monitord.c
> >> @@ -38,11 +38,11 @@
> >> #include <netinet/in.h>
> >> #include <net/if.h>
> >>
> >> -#include <lxc/af_unix.h>
> >> -#include <lxc/log.h>
> >> -#include <lxc/mainloop.h>
> >> -#include <lxc/monitor.h>
> >> -#include <lxc/utils.h>
> >> +#include "af_unix.h"
> >> +#include "log.h"
> >> +#include "mainloop.h"
> >> +#include "monitor.h"
> >> +#include "utils.h"
> >>
> >> #define CLIENTFDS_CHUNK 64
> >>
> >> diff --git a/src/lxc/lxc_snapshot.c b/src/lxc/lxc_snapshot.c
> >> index 1de5671..e83f1b2 100644
> >> --- a/src/lxc/lxc_snapshot.c
> >> +++ b/src/lxc/lxc_snapshot.c
> >> @@ -17,8 +17,6 @@
> >> * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
> >> */
> >>
> >> -#include <lxc/lxccontainer.h>
> >> -
> >> #include <stdio.h>
> >> #include <libgen.h>
> >> #include <unistd.h>
> >> @@ -26,10 +24,11 @@
> >> #include <sys/types.h>
> >> #include <fcntl.h>
> >>
> >> -#include <lxc/lxc.h>
> >> -#include <lxc/log.h>
> >> -#include <lxc/bdev.h>
> >> +#include <lxc/lxccontainer.h>
> >>
> >> +#include "lxc.h"
> >> +#include "log.h"
> >> +#include "bdev.h"
> >> #include "arguments.h"
> >> #include "utils.h"
> >>
> >> diff --git a/src/lxc/lxc_start.c b/src/lxc/lxc_start.c
> >> index acf3145..e6ca355 100644
> >> --- a/src/lxc/lxc_start.c
> >> +++ b/src/lxc/lxc_start.c
> >> @@ -40,10 +40,11 @@
> >> #include <netinet/in.h>
> >> #include <net/if.h>
> >>
> >> +#include <lxc/lxccontainer.h>
> >> +
> >> #include "log.h"
> >> #include "caps.h"
> >> #include "lxc.h"
> >> -#include <lxc/lxccontainer.h>
> >> #include "conf.h"
> >> #include "cgroup.h"
> >> #include "utils.h"
> >> diff --git a/src/lxc/lxc_stop.c b/src/lxc/lxc_stop.c
> >> index 7940053..a7f2907 100644
> >> --- a/src/lxc/lxc_stop.c
> >> +++ b/src/lxc/lxc_stop.c
> >> @@ -25,10 +25,10 @@
> >> #include <unistd.h>
> >> #include <sys/types.h>
> >>
> >> -#include <lxc/lxc.h>
> >> -#include <lxc/log.h>
> >> -
> >> #include <lxc/lxccontainer.h>
> >> +
> >> +#include "lxc.h"
> >> +#include "log.h"
> >> #include "arguments.h"
> >> #include "commands.h"
> >> #include "utils.h"
> >> diff --git a/src/lxc/lxc_unfreeze.c b/src/lxc/lxc_unfreeze.c
> >> index e5def1a..ccabada 100644
> >> --- a/src/lxc/lxc_unfreeze.c
> >> +++ b/src/lxc/lxc_unfreeze.c
> >> @@ -25,10 +25,10 @@
> >> #include <libgen.h>
> >> #include <sys/types.h>
> >>
> >> -#include <lxc/lxc.h>
> >> -#include <lxc/log.h>
> >> #include <lxc/lxccontainer.h>
> >>
> >> +#include "lxc.h"
> >> +#include "log.h"
> >> #include "arguments.h"
> >>
> >> lxc_log_define(lxc_unfreeze_ui, lxc_cgroup);
> >> diff --git a/src/lxc/lxc_user_nic.c b/src/lxc/lxc_user_nic.c
> >> index 16f1495..67b1fa8 100644
> >> --- a/src/lxc/lxc_user_nic.c
> >> +++ b/src/lxc/lxc_user_nic.c
> >> @@ -45,6 +45,7 @@
> >> #include <linux/rtnetlink.h>
> >> #include <linux/sockios.h>
> >> #include <sys/param.h>
> >> +
> >> #include "config.h"
> >> #include "utils.h"
> >> #include "network.h"
> >> diff --git a/src/lxc/lxc_usernsexec.c b/src/lxc/lxc_usernsexec.c
> >> index e36ff34..f152f91 100644
> >> --- a/src/lxc/lxc_usernsexec.c
> >> +++ b/src/lxc/lxc_usernsexec.c
> >> @@ -38,6 +38,7 @@
> >> #include <sched.h>
> >> #include <pwd.h>
> >> #include <grp.h>
> >> +
> >> #include "config.h"
> >> #include "namespace.h"
> >> #include "utils.h"
> >> diff --git a/src/lxc/lxc_wait.c b/src/lxc/lxc_wait.c
> >> index b00377c..269acfd 100644
> >> --- a/src/lxc/lxc_wait.c
> >> +++ b/src/lxc/lxc_wait.c
> >> @@ -28,9 +28,10 @@
> >> #include <signal.h>
> >> #include <sys/types.h>
> >>
> >> -#include <lxc/lxc.h>
> >> -#include <lxc/log.h>
> >> #include <lxc/lxccontainer.h>
> >> +
> >> +#include "lxc.h"
> >> +#include "log.h"
> >> #include "arguments.h"
> >>
> >> lxc_log_define(lxc_wait_ui, lxc_monitor);
> >> diff --git a/src/lxc/lxccontainer.c b/src/lxc/lxccontainer.c
> >> index e1d004f..b62f7ba 100644
> >> --- a/src/lxc/lxccontainer.c
> >> +++ b/src/lxc/lxccontainer.c
> >> @@ -30,26 +30,28 @@
> >> #include <fcntl.h>
> >> #include <sched.h>
> >> #include <dirent.h>
> >> +#include <sched.h>
> >> +#include <arpa/inet.h>
> >> +#include <libgen.h>
> >> +
> >> +#include <lxc/lxccontainer.h>
> >> +#include <lxc/version.h>
> >> +
> >> #include "config.h"
> >> #include "lxc.h"
> >> #include "state.h"
> >> -#include <lxc/lxccontainer.h>
> >> #include "conf.h"
> >> #include "confile.h"
> >> #include "console.h"
> >> #include "cgroup.h"
> >> #include "commands.h"
> >> -#include "version.h"
> >> #include "log.h"
> >> #include "bdev.h"
> >> #include "utils.h"
> >> #include "attach.h"
> >> -#include <lxc/utils.h>
> >> -#include <lxc/monitor.h>
> >> -#include <lxc/namespace.h>
> >> -#include <sched.h>
> >> -#include <arpa/inet.h>
> >> -#include <libgen.h>
> >> +#include "utils.h"
> >> +#include "monitor.h"
> >> +#include "namespace.h"
> >> #include "lxclock.h"
> >>
> >> #if HAVE_IFADDRS_H
> >> diff --git a/src/lxc/lxccontainer.h b/src/lxc/lxccontainer.h
> >> index 7d1839e..f62ff8f 100644
> >> --- a/src/lxc/lxccontainer.h
> >> +++ b/src/lxc/lxccontainer.h
> >> @@ -22,12 +22,13 @@
> >>
> >> #ifndef __LXC_CONTAINER_H
> >> #define __LXC_CONTAINER_H
> >> -#include "attach_options.h"
> >> #include <malloc.h>
> >> #include <semaphore.h>
> >> #include <stdbool.h>
> >> #include <stdlib.h>
> >>
> >> +#include <lxc/attach_options.h>
> >> +
> >> #ifdef __cplusplus
> >> extern "C" {
> >> #endif
> >> diff --git a/src/lxc/lxclock.c b/src/lxc/lxclock.c
> >> index 28691b0..b30f4c3 100644
> >> --- a/src/lxc/lxclock.c
> >> +++ b/src/lxc/lxclock.c
> >> @@ -27,10 +27,12 @@
> >> #include <fcntl.h>
> >> #include <stdlib.h>
> >> #include <pthread.h>
> >> -#include <lxc/utils.h>
> >> -#include <lxc/log.h>
> >> +
> >> #include <lxc/lxccontainer.h>
> >>
> >> +#include "utils.h"
> >> +#include "log.h"
> >> +
> >> #ifdef MUTEX_DEBUGGING
> >> #include <execinfo.h>
> >> #endif
> >> diff --git a/src/lxc/monitor.c b/src/lxc/monitor.c
> >> index 7e0a713..2cc4831 100644
> >> --- a/src/lxc/monitor.c
> >> +++ b/src/lxc/monitor.c
> >> @@ -41,12 +41,11 @@
> >>
> >> #include "error.h"
> >> #include "af_unix.h"
> >> -
> >> -#include <lxc/log.h>
> >> -#include <lxc/lxclock.h>
> >> -#include <lxc/state.h>
> >> -#include <lxc/monitor.h>
> >> -#include <lxc/utils.h>
> >> +#include "log.h"
> >> +#include "lxclock.h"
> >> +#include "state.h"
> >> +#include "monitor.h"
> >> +#include "utils.h"
> >>
> >> lxc_log_define(lxc_monitor, lxc);
> >>
> >> diff --git a/src/lxc/monitor.h b/src/lxc/monitor.h
> >> index 8093919..7e2a468 100644
> >> --- a/src/lxc/monitor.h
> >> +++ b/src/lxc/monitor.h
> >> @@ -26,7 +26,7 @@
> >> #include <sys/param.h>
> >> #include <sys/un.h>
> >>
> >> -#include <lxc/conf.h>
> >> +#include "conf.h"
> >>
> >> typedef enum {
> >> lxc_msg_state,
> >> diff --git a/src/lxc/parse.c b/src/lxc/parse.c
> >> index ed51d88..ea13d06 100644
> >> --- a/src/lxc/parse.c
> >> +++ b/src/lxc/parse.c
> >> @@ -31,7 +31,7 @@
> >> #include "parse.h"
> >> #include "config.h"
> >> #include "utils.h"
> >> -#include <lxc/log.h>
> >> +#include "log.h"
> >>
> >> lxc_log_define(lxc_parse, lxc);
> >>
> >> diff --git a/src/lxc/restart.c b/src/lxc/restart.c
> >> index 7232074..8d5b792 100644
> >> --- a/src/lxc/restart.c
> >> +++ b/src/lxc/restart.c
> >> @@ -30,10 +30,10 @@
> >> #include <errno.h>
> >> #include <unistd.h>
> >>
> >> -#include <lxc/log.h>
> >> -#include <lxc/start.h> /* for struct lxc_handler */
> >> -#include <lxc/utils.h>
> >> -#include <lxc/error.h>
> >> +#include "log.h"
> >> +#include "start.h" /* for struct lxc_handler */
> >> +#include "utils.h"
> >> +#include "error.h"
> >>
> >> lxc_log_define(lxc_restart, lxc);
> >>
> >> diff --git a/src/lxc/seccomp.c b/src/lxc/seccomp.c
> >> index 1abd697..ab6c856 100644
> >> --- a/src/lxc/seccomp.c
> >> +++ b/src/lxc/seccomp.c
> >> @@ -27,9 +27,9 @@
> >> #include <seccomp.h>
> >> #include <errno.h>
> >> #include <seccomp.h>
> >> +
> >> #include "config.h"
> >> #include "lxcseccomp.h"
> >> -
> >> #include "log.h"
> >>
> >> lxc_log_define(lxc_seccomp, lxc);
> >> diff --git a/src/lxc/start.h b/src/lxc/start.h
> >> index c1f7909..ec7f3f6 100644
> >> --- a/src/lxc/start.h
> >> +++ b/src/lxc/start.h
> >> @@ -23,10 +23,10 @@
> >> #ifndef __lxc_state_h
> >> #define __lxc_state_h
> >>
> >> -#include "config.h"
> >> -
> >> -#include <lxc/state.h>
> >> #include <sys/param.h>
> >> +
> >> +#include "config.h"
> >> +#include "state.h"
> >> #include "namespace.h"
> >>
> >> struct lxc_conf;
> >> diff --git a/src/lxc/state.c b/src/lxc/state.c
> >> index 398833a..411be85 100644
> >> --- a/src/lxc/state.c
> >> +++ b/src/lxc/state.c
> >> @@ -32,11 +32,11 @@
> >> #include <sys/stat.h>
> >> #include <sys/file.h>
> >>
> >> -#include <lxc/lxc.h>
> >> -#include <lxc/log.h>
> >> -#include <lxc/start.h>
> >> -#include <lxc/cgroup.h>
> >> -#include <lxc/monitor.h>
> >> +#include "lxc.h"
> >> +#include "log.h"
> >> +#include "start.h"
> >> +#include "cgroup.h"
> >> +#include "monitor.h"
> >> #include "commands.h"
> >> #include "config.h"
> >>
> >> diff --git a/src/lxc/utils.h b/src/lxc/utils.h
> >> index 844565d..2537562 100644
> >> --- a/src/lxc/utils.h
> >> +++ b/src/lxc/utils.h
> >> @@ -30,6 +30,7 @@
> >> #include <sys/syscall.h>
> >> #include <sys/types.h>
> >> #include <unistd.h>
> >> +
> >> #include "config.h"
> >>
> >> /* returns 1 on success, 0 if there were any failures */
> >> diff --git a/src/python-lxc/lxc.c b/src/python-lxc/lxc.c
> >> index 0099b98..5ee8dd0 100644
> >> --- a/src/python-lxc/lxc.c
> >> +++ b/src/python-lxc/lxc.c
> >> @@ -25,9 +25,9 @@
> >> #include <Python.h>
> >> #include "structmember.h"
> >> #include <lxc/lxccontainer.h>
> >> -#include <lxc/utils.h>
> >> -#include <lxc/namespace.h>
> >> -#include <lxc/confile.h>
> >> +#include "lxc/utils.h"
> >> +#include "lxc/namespace.h"
> >> +#include "lxc/confile.h"
> >> #include <stdio.h>
> >> #include <sys/wait.h>
> >>
> >> diff --git a/src/tests/attach.c b/src/tests/attach.c
> >> index 54f899f..b63c633 100644
> >> --- a/src/tests/attach.c
> >> +++ b/src/tests/attach.c
> >> @@ -20,8 +20,8 @@
> >> */
> >>
> >> #include <lxc/lxccontainer.h>
> >> -#include <lxc/utils.h>
> >> -#include <lxc/lsm/lsm.h>
> >> +#include "lxc/utils.h"
> >> +#include "lxc/lsm/lsm.h"
> >>
> >> #include <string.h>
> >> #include <sys/stat.h>
> >> diff --git a/src/tests/cgpath.c b/src/tests/cgpath.c
> >> index ef192c6..f0e2de8 100644
> >> --- a/src/tests/cgpath.c
> >> +++ b/src/tests/cgpath.c
> >> @@ -28,9 +28,9 @@
> >> #include <errno.h>
> >> #include <string.h>
> >> #include <sys/stat.h>
> >> -#include "../lxc/cgroup.h"
> >> -#include "../lxc/lxc.h"
> >> -#include "../lxc/commands.h"
> >> +#include "lxc/cgroup.h"
> >> +#include "lxc/lxc.h"
> >> +#include "lxc/commands.h"
> >>
> >> #define MYNAME "lxctest1"
> >>
> >> diff --git a/src/tests/containertests.c b/src/tests/containertests.c
> >> index e6f05af..d3742e7 100644
> >> --- a/src/tests/containertests.c
> >> +++ b/src/tests/containertests.c
> >> @@ -26,7 +26,7 @@
> >> #include <stdlib.h>
> >> #include <errno.h>
> >> #include <string.h>
> >> -#include <lxc/state.h>
> >> +#include "lxc/state.h"
> >>
> >> #define MYNAME "lxctest1"
> >>
> >> diff --git a/src/tests/get_item.c b/src/tests/get_item.c
> >> index 10ab3d1..1e41217 100644
> >> --- a/src/tests/get_item.c
> >> +++ b/src/tests/get_item.c
> >> @@ -26,7 +26,7 @@
> >> #include <stdlib.h>
> >> #include <errno.h>
> >> #include <string.h>
> >> -#include <lxc/state.h>
> >> +#include "lxc/state.h"
> >>
> >> #define MYNAME "lxctest1"
> >>
> >> diff --git a/src/tests/getkeys.c b/src/tests/getkeys.c
> >> index 5c336db..ed68440 100644
> >> --- a/src/tests/getkeys.c
> >> +++ b/src/tests/getkeys.c
> >> @@ -25,7 +25,7 @@
> >> #include <sys/wait.h>
> >> #include <stdlib.h>
> >> #include <errno.h>
> >> -#include <lxc/state.h>
> >> +#include "lxc/state.h"
> >>
> >> #define MYNAME "lxctest1"
> >>
> >> diff --git a/src/tests/locktests.c b/src/tests/locktests.c
> >> index 360851f..191414c 100644
> >> --- a/src/tests/locktests.c
> >> +++ b/src/tests/locktests.c
> >> @@ -16,7 +16,7 @@
> >> * with this program; if not, write to the Free Software Foundation, Inc.,
> >> * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
> >> */
> >> -#include "../lxc/lxclock.h"
> >> +#include "lxc/lxclock.h"
> >> #include <unistd.h>
> >> #include <signal.h>
> >> #include <stdio.h>
> >> diff --git a/src/tests/reboot.c b/src/tests/reboot.c
> >> index b27d523..3601e0d 100644
> >> --- a/src/tests/reboot.c
> >> +++ b/src/tests/reboot.c
> >> @@ -25,7 +25,7 @@
> >> #include <sys/types.h>
> >> #include <sys/wait.h>
> >>
> >> -#include <lxc/namespace.h>
> >> +#include "lxc/namespace.h"
> >>
> >> #include <sched.h>
> >> #include <linux/sched.h>
> >> diff --git a/src/tests/snapshot.c b/src/tests/snapshot.c
> >> index d9fed36..6e13932 100644
> >> --- a/src/tests/snapshot.c
> >> +++ b/src/tests/snapshot.c
> >> @@ -23,7 +23,7 @@
> >> #include <stdio.h>
> >> #include <string.h>
> >> #include <sys/stat.h>
> >> -#include "../lxc/lxc.h"
> >> +#include "lxc/lxc.h"
> >>
> >> #define MYNAME "snapxxx1"
> >> #define RESTNAME "snapxxx2"
> >> --
> >> 1.8.3.2
> >>
> >> _______________________________________________
> >> lxc-devel mailing list
> >> lxc-devel at lists.linuxcontainers.org
> >> http://lists.linuxcontainers.org/listinfo/lxc-devel
> > _______________________________________________
> > lxc-devel mailing list
> > lxc-devel at lists.linuxcontainers.org
> > http://lists.linuxcontainers.org/listinfo/lxc-devel
>
>
>
> --
> S.Çağlar Onur <caglar at 10ur.org>
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
More information about the lxc-devel
mailing list