Commit 00b3c2e2 by Cedric Le Goater Committed by Daniel Lezcano

cleanup <lxc/lxc.h>

<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: 's avatarCedric Le Goater <clg@fr.ibm.com> Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent b0691f81
......@@ -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);
......
......@@ -36,11 +36,8 @@
#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);
......
......@@ -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"
......
......@@ -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);
......
......@@ -26,6 +26,8 @@
#include <netinet/in.h>
#include <sys/param.h>
#include <lxc/list.h>
enum {
EMPTY,
VETH,
......
......@@ -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);
......
......@@ -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);
......
......@@ -27,7 +27,10 @@
#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"
......
......@@ -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);
......
......@@ -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
......
......@@ -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);
......
......@@ -27,7 +27,10 @@
#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"
......
......@@ -37,8 +37,10 @@
#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);
......
......@@ -31,8 +31,10 @@
#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"
......
......@@ -27,6 +27,8 @@
#include <string.h>
#include <lxc/lxc.h>
#include <lxc/log.h>
#include "arguments.h"
static const struct option my_longopts[] = {
......
......@@ -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[] = {
......
......@@ -33,7 +33,11 @@
#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);
......
......@@ -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);
......
......@@ -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)
......
......@@ -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);
......
......@@ -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[] = {
......
......@@ -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[] = {
......
......@@ -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);
......
......@@ -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);
......
......@@ -36,8 +36,10 @@
#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);
......
......@@ -27,7 +27,7 @@
#include <signal.h>
#include <namespace.h>
#include <lxc/lxc.h>
#include <lxc/log.h>
lxc_log_define(lxc_namespace, lxc);
......
......@@ -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;
......
......@@ -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);
......
......@@ -20,6 +20,11 @@
* 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
......@@ -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"
......
......@@ -29,10 +29,12 @@
#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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment