Commit 77075659 by Cedric Le Goater Committed by Daniel Lezcano

use different log categories in commands

lxc_<cmd>.c and <cmd>.c files use the same log category : lxc_<cmd>. The symbol is multiply defined and linking statically lxc commands is not possible. The patch introduces new log categories with a '_ui' suffix to differentiate the command line interface from the library routine. Reported-by: 's avatarCiprian Dorin, Craciun <ciprian.craciun@gmail.com> Signed-off-by: 's avatarCedric Le Goater <clg@fr.ibm.com> Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 7a7ff0c6
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "arguments.h" #include "arguments.h"
lxc_log_define(lxc_cgroup, lxc); lxc_log_define(lxc_cgroup_ui, lxc_cgroup);
static int my_checker(const struct lxc_arguments* args) static int my_checker(const struct lxc_arguments* args)
{ {
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "arguments.h" #include "arguments.h"
#include "config.h" #include "config.h"
lxc_log_define(lxc_checkpoint, lxc); lxc_log_define(lxc_checkpoint_ui, lxc_checkpoint);
static int my_checker(const struct lxc_arguments* args) static int my_checker(const struct lxc_arguments* args)
{ {
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#include "arguments.h" #include "arguments.h"
lxc_log_define(lxc_console, lxc); lxc_log_define(lxc_console_ui, lxc_console);
static int my_parser(struct lxc_arguments* args, int c, char* arg) static int my_parser(struct lxc_arguments* args, int c, char* arg)
{ {
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include "arguments.h" #include "arguments.h"
#include "config.h" #include "config.h"
lxc_log_define(lxc_execute, lxc); lxc_log_define(lxc_execute_ui, lxc_start);
static int my_checker(const struct lxc_arguments* args) static int my_checker(const struct lxc_arguments* args)
{ {
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include <lxc/monitor.h> #include <lxc/monitor.h>
#include "arguments.h" #include "arguments.h"
lxc_log_define(monitor, lxc); lxc_log_define(lxc_monitor_ui, lxc_monitor);
static const struct option my_longopts[] = { static const struct option my_longopts[] = {
LXC_COMMON_OPTIONS LXC_COMMON_OPTIONS
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "arguments.h" #include "arguments.h"
lxc_log_define(lxc_restart, lxc); lxc_log_define(lxc_restart_ui, lxc_restart);
static int my_checker(const struct lxc_arguments* args) static int my_checker(const struct lxc_arguments* args)
{ {
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
#include "confile.h" #include "confile.h"
#include "arguments.h" #include "arguments.h"
lxc_log_define(lxc_start, lxc); lxc_log_define(lxc_start_ui, lxc_start);
static int my_parser(struct lxc_arguments* args, int c, char* arg) static int my_parser(struct lxc_arguments* args, int c, char* arg)
{ {
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <lxc/log.h> #include <lxc/log.h>
#include <lxc/namespace.h> #include <lxc/namespace.h>
lxc_log_define(lxc_unshare, lxc); lxc_log_define(lxc_unshare_ui, lxc);
void usage(char *cmd) void usage(char *cmd)
{ {
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include <lxc/monitor.h> #include <lxc/monitor.h>
#include "arguments.h" #include "arguments.h"
lxc_log_define(lxc_wait, lxc); lxc_log_define(lxc_wait_ui, lxc_monitor);
static int my_checker(const struct lxc_arguments* args) static int my_checker(const struct lxc_arguments* args)
{ {
......
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