]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cleanup <lxc/lxc.h>
authorCedric Le Goater <clg@vnet.ibm.com>
Tue, 17 Nov 2009 09:56:23 +0000 (10:56 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Tue, 17 Nov 2009 09:56:23 +0000 (10:56 +0100)
<lxc/lxc.h>  should only include what is needed. This patch removes
all useless headers from lxc.h and fixed other .c files.

Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
31 files changed:
src/lxc/cgroup.c
src/lxc/checkpoint.c
src/lxc/commands.c
src/lxc/conf.c
src/lxc/conf.h
src/lxc/confile.c
src/lxc/confile.h
src/lxc/console.c
src/lxc/freezer.c
src/lxc/lxc.h
src/lxc/lxc_cgroup.c
src/lxc/lxc_checkpoint.c
src/lxc/lxc_console.c
src/lxc/lxc_execute.c
src/lxc/lxc_freeze.c
src/lxc/lxc_info.c
src/lxc/lxc_init.c
src/lxc/lxc_monitor.c
src/lxc/lxc_restart.c
src/lxc/lxc_start.c
src/lxc/lxc_stop.c
src/lxc/lxc_unfreeze.c
src/lxc/lxc_unshare.c
src/lxc/lxc_wait.c
src/lxc/monitor.c
src/lxc/namespace.c
src/lxc/restart.c
src/lxc/start.c
src/lxc/start.h
src/lxc/state.c
src/lxc/stop.c

index 17abb1654990621d33accc0ae8606ec203e270be..3fff51ebe03a18fe2e867c615e3cd48ec952ee45 100644 (file)
@@ -39,8 +39,9 @@
 #include "error.h"
 #include "config.h"
 
-#include <lxc/lxc.h>
 #include <lxc/log.h>
+#include <lxc/cgroup.h>
+#include <lxc/start.h>
 
 lxc_log_define(lxc_cgroup, lxc);
 
index b7f172decd0946de8b3e8f5521fc394e849403e1..7c35331a95af3742eead5939df4f92626a0a7d88 100644 (file)
 #include <netinet/in.h>
 #include <net/if.h>
 
-#include "error.h"
-#include "lxc_plugin.h"
-#include <lxc.h>
-
 #include <lxc/log.h>
+#include "lxc_plugin.h"
 
 lxc_log_define(lxc_checkpoint, lxc);
 
index e0ca34872bbe5eb2a9216928069d0817a22aec3c..02239e5413e2e8449b9f2f7367a8d9dec41d2b15 100644 (file)
@@ -30,7 +30,9 @@
 #include <sys/poll.h>
 #include <sys/param.h>
 
-#include <lxc/lxc.h>
+#include <lxc/log.h>
+#include <lxc/conf.h>
+#include <lxc/start.h> /* for struct lxc_handler */
 
 #include "commands.h"
 #include "mainloop.h"
index ab324ab5cdf900419b4782750a29d22654ec0835..b4e3a3e49059c237bd4d68ef06e60c12bcd8acf3 100644 (file)
@@ -50,8 +50,9 @@
 #include "parse.h"
 #include "config.h"
 
-#include <lxc/lxc.h>
+#include <lxc/conf.h>
 #include <lxc/log.h>
+#include <lxc/lxc.h>   /* for lxc_cgroup_set() */
 
 lxc_log_define(lxc_conf, lxc);
 
index 8a3ebf092149296a0552cc1fd87ddc1994c41c46..215f1e5108f06be22db5356912e7113801288913 100644 (file)
@@ -26,6 +26,8 @@
 #include <netinet/in.h>
 #include <sys/param.h>
 
+#include <lxc/list.h>
+
 enum {
        EMPTY,
        VETH,
index 5e0081cb82214b51dffdbb58708ea9a3f17f155f..43bede4d72a09377797003fd6f529dfb2010d107 100644 (file)
@@ -34,8 +34,8 @@
 
 #include "parse.h"
 
-#include <lxc/lxc.h>
 #include <lxc/log.h>
+#include <lxc/conf.h>
 
 lxc_log_define(lxc_confile, lxc);
 
index d0e7653e8d015c8adfa9f1489cfcc4fef08cf1cd..20c9b3960ea40719d6f4e97ae580bf41c25fd297 100644 (file)
@@ -21,6 +21,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
 
+struct lxc_conf;
+
 extern int lxc_config_read(const char *file, struct lxc_conf *conf);
 
 
index bd117a5e976e242293a8feb38e48a5126503e039..52f6cecf1e1c9ac7fa3e0e9df14598d12b1c64b6 100644 (file)
 #include <sys/types.h>
 #include <sys/un.h>
 
-#include <lxc/lxc.h>
+#include <lxc/log.h>
+#include <lxc/conf.h>
+#include <lxc/start.h>         /* for struct lxc_handler */
+
 #include "commands.h"
 #include "af_unix.h"
 
index f4b40187759e06ffbe1c0f2bfa56033e34e3a899..cff954ec98f9edcade3ea8138352652e364c9e24 100644 (file)
@@ -32,8 +32,9 @@
 #include <sys/param.h>
 
 #include "error.h"
-#include <lxc/lxc.h>
+
 #include <lxc/log.h>
+#include <lxc/cgroup.h>
 
 lxc_log_define(lxc_freezer, lxc);
 
index 1d04b9f2e9d98b951689a1d50b997fb8b4bd625b..a78fb65d7861b3a9826711bb625a1eb08429d83a 100644 (file)
@@ -33,16 +33,10 @@ extern "C" {
  lxc/lxc.h will contain exports of liblxc
  **/
 
+#include <stddef.h>
 #include <lxc/state.h>
-#include <lxc/list.h>
-#include <lxc/log.h>
-#include <lxc/conf.h>
-#include <lxc/namespace.h>
-#include <lxc/utils.h>
-#include <lxc/error.h>
-#include <lxc/cgroup.h>
-#include <lxc/monitor.h>
-#include <lxc/start.h>
+
+struct lxc_msg;
 
 /*
  * Start the specified command inside a container
index ae1c9648864db38a0d73bccd61ead40f532ca32b..f394d26fef4e0814599389162825e89e13aab422 100644 (file)
@@ -27,6 +27,8 @@
 #include <sys/types.h>
 
 #include <lxc/lxc.h>
+#include <lxc/log.h>
+
 #include "arguments.h"
 
 lxc_log_define(lxc_cgroup, lxc);
index 4d0e210b644946519d28f1f2cdef7db2c0bcfa8f..ff59048e6cc5f6d86a497fe9bf84143667b48595 100644 (file)
 #include <unistd.h>
 #include <sys/types.h>
 
-#include <lxc.h>
+#include <lxc/lxc.h>
+#include <lxc/log.h>
+#include <lxc/utils.h>
+
 #include "arguments.h"
 #include "config.h"
 
index b662572512976a89aeef48c7b95cb86959d3838e..cff208f6bc37049dc8ffaebb17e95a409bea84a2 100644 (file)
 #include <sys/stat.h>
 #include <sys/poll.h>
 
-#include "error.h"
-#include "lxc.h"
+#include <lxc/error.h>
+#include <lxc/lxc.h>
+#include <lxc/log.h>
+
 #include "arguments.h"
 
 lxc_log_define(lxc_console, lxc);
index 746cb4e8bb6558ed257e3c30cd4b9db105fc8346..58213503f3b1d80cd106c17e0db9b163e3304c85 100644 (file)
 #include <sys/stat.h>
 #include <sys/param.h>
 
+#include <lxc/log.h>
+#include <lxc/confile.h>
 #include <lxc/lxc.h>
-#include "confile.h"
+
 #include "arguments.h"
 #include "config.h"
 
index a5be16c8d7e1d49c54f842048bf89789bd1d74a6..770d923ffaca979a98faa904f0c503f0b1e90cb0 100644 (file)
@@ -27,6 +27,8 @@
 #include <string.h>
 
 #include <lxc/lxc.h>
+#include <lxc/log.h>
+
 #include "arguments.h"
 
 static const struct option my_longopts[] = {
index 34518d93e6152bee5b8fc67fcceb4339c2d4632a..4facbf29ed2f47c4c0acbdb6dab9d4afb166a878 100644 (file)
@@ -26,6 +26,8 @@
 #include <sys/types.h>
 
 #include <lxc/lxc.h>
+#include <lxc/log.h>
+
 #include "arguments.h"
 
 static const struct option my_longopts[] = {
index deef34310d291fcf49233c58f40172ef617785d8..191f7c4da4ad97794f6e24d34f3b70a51f727136 100644 (file)
 #include <sys/mount.h>
 #define _GNU_SOURCE
 #include <getopt.h>
-#include "lxc.h"
+
+#include <lxc/lxc.h>
+#include <lxc/log.h>
+#include <lxc/utils.h>
+#include <lxc/error.h>
 
 lxc_log_define(lxc_init, lxc);
 
index 4befa15a949cbbee85ce3d6b88bc3f0f2f8759b7..7d141888e58976e87f48da0c1cefa3daa707a447 100644 (file)
@@ -29,6 +29,8 @@
 #include <sys/types.h>
 
 #include <lxc/lxc.h>
+#include <lxc/log.h>
+#include <lxc/monitor.h>
 #include "arguments.h"
 
 lxc_log_define(monitor, lxc);
index 9f4bb1dbc50109ea28dfb69a2a2428d1186d465f..77895a08449743f538d4a4018e802320e28f44b9 100644 (file)
@@ -25,7 +25,9 @@
 #include <unistd.h>
 #include <sys/types.h>
 
-#include <lxc.h>
+#include <lxc/lxc.h>
+#include <lxc/log.h>
+
 #include "arguments.h"
 
 static int my_checker(const struct lxc_arguments* args)
index ffeb66baebcc0cc346c85f3ee5525d8629abf168..de78290ff3f4985e8c626bc4bc2664ed1c3bfb97 100644 (file)
@@ -39,6 +39,8 @@
 
 #include <lxc/lxc.h>
 #include <lxc/log.h>
+#include <lxc/utils.h>
+
 #include "arguments.h"
 
 lxc_log_define(lxc_start, lxc);
index 01d6d8f9af130063bd1431b83f7421d1c5c391d2..639b7500be35a9e88c41fadce45a4198740f1d00 100644 (file)
@@ -26,6 +26,8 @@
 #include <sys/types.h>
 
 #include <lxc/lxc.h>
+#include <lxc/log.h>
+
 #include "arguments.h"
 
 static const struct option my_longopts[] = {
index 02ca70ddaeafe8a3b9301f9fee104f4d67b09c73..22be8395b0123a2c1c699f8183aee4e7f5ef42d3 100644 (file)
@@ -26,6 +26,8 @@
 #include <sys/types.h>
 
 #include <lxc/lxc.h>
+#include <lxc/log.h>
+
 #include "arguments.h"
 
 static const struct option my_longopts[] = {
index f91d4cd9910e676f4a2b927a2f5b6ac38212106a..463968780bd88399c000ba3e1bbddc9dc18b73fc 100644 (file)
@@ -32,7 +32,8 @@
 #include <sys/wait.h>
 #include <pwd.h>
 
-#include <lxc/lxc.h>
+#include <lxc/log.h>
+#include <lxc/namespace.h>
 
 lxc_log_define(lxc_unshare, lxc);
 
index bc1bb0621697c81b06492bb3e21a6db9fe1dbee6..a5199e212361929677abbe7ff0394eae71f60159 100644 (file)
@@ -27,6 +27,8 @@
 #include <sys/types.h>
 
 #include <lxc/lxc.h>
+#include <lxc/log.h>
+#include <lxc/monitor.h>
 #include "arguments.h"
 
 lxc_log_define(lxc_wait, lxc);
index 700f5bc3dea9422d60a470d7c083717fef07ad04..7ec1701836a8919061f78436cb282aa7adcb4b06 100644 (file)
 
 #include "error.h"
 #include "af_unix.h"
-#include <lxc/lxc.h>
+
 #include <lxc/log.h>
+#include <lxc/state.h>
+#include <lxc/monitor.h>
 
 lxc_log_define(lxc_monitor, lxc);
 
index 70f67266e77aa5e63e244c0b59ed727993c48aa2..72e47e1ea45512c0cb9f703b3c56e85b5dfddbce 100644 (file)
@@ -27,7 +27,7 @@
 #include <signal.h>
 #include <namespace.h>
 
-#include <lxc/lxc.h>
+#include <lxc/log.h>
 
 lxc_log_define(lxc_namespace, lxc);
 
index f382ae38e533a01469e3573d3c6e969a7ae10fcf..ce8cd802f60cf3b084218b4fe9b9b0580ec24099 100644 (file)
@@ -44,9 +44,6 @@
 
 lxc_log_define(lxc_restart, lxc);
 
-LXC_TTY_HANDLER(SIGINT);
-LXC_TTY_HANDLER(SIGQUIT);
-
 int lxc_restart(const char *name, int fd, unsigned long flags)
 {
        return 0;
index 6537780303c6f16a90c858ac7bc187b96178c139..e59b4e36bafbec784980e5c1851924a54c8afad4 100644 (file)
@@ -44,9 +44,6 @@
 #include <sys/un.h>
 #include <sys/poll.h>
 
-#include <lxc/lxc.h>
-#include <lxc/confile.h>
-
 #ifdef HAVE_SYS_SIGNALFD_H 
 #  include <sys/signalfd.h>
 #else
@@ -91,13 +88,19 @@ int signalfd(int fd, const sigset_t *mask, int flags)
 #define PR_CAPBSET_DROP 24
 #endif
 
+#include <lxc/log.h>
+#include <lxc/conf.h>
+#include <lxc/confile.h>
+#include <lxc/start.h>
+#include <lxc/utils.h>
+#include <lxc/cgroup.h>
+#include <lxc/monitor.h>
+
 #include "error.h"
 #include "af_unix.h"
 #include "mainloop.h"
 #include "commands.h"
 
-#include <lxc/lxc.h>
-#include <lxc/log.h>
 
 lxc_log_define(lxc_start, lxc);
 
index 03d8762eed51294ef6bf2a65a8189d9e5b5a8ed2..ca0c08a56f985dbf19d39056c7bc341c0034665f 100644 (file)
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  */
+#ifndef __lxc_state_h
+#define __lxc_state_h
+
+#include <lxc/conf.h>
+#include <lxc/state.h>
 
 struct lxc_handler {
 
@@ -40,5 +45,5 @@ extern int lxc_poll(const char *name, struct lxc_handler *handler);
 extern void lxc_abort(const char *name, struct lxc_handler *handler);
 extern void lxc_fini(const char *name, struct lxc_handler *handler);
 
-
+#endif
 
index 6125fa36b96e81e7cba7bf82bf6eef42560f0899..04966579de1a9ab6f8226838f6af77e398e89eb8 100644 (file)
@@ -31,8 +31,8 @@
 #include <sys/stat.h>
 #include <sys/file.h>
 
-#include <lxc/lxc.h>
 #include <lxc/log.h>
+#include <lxc/start.h>
 #include "commands.h"
 #include "config.h"
 
index 504d27e585c27f44b9288e86042761a41239796d..b751af51be78d9a54da3bf8b7f8128491177ac59 100644 (file)
 #include <sys/signal.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <sys/socket.h>
 #include <fcntl.h>
 
-#include <lxc/lxc.h>
 #include <lxc/log.h>
+#include <lxc/start.h>
+
 #include "commands.h"
 
 lxc_log_define(lxc_stop, lxc);