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: Ciprian Dorin, Craciun <ciprian.craciun@gmail.com>
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
---
 src/lxc/lxc_cgroup.c     |    2 +-
 src/lxc/lxc_checkpoint.c |    2 +-
 src/lxc/lxc_console.c    |    2 +-
 src/lxc/lxc_execute.c    |    2 +-
 src/lxc/lxc_monitor.c    |    2 +-
 src/lxc/lxc_restart.c    |    2 +-
 src/lxc/lxc_start.c      |    2 +-
 src/lxc/lxc_unshare.c    |    2 +-
 src/lxc/lxc_wait.c       |    2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

Index: lxc/src/lxc/lxc_cgroup.c
===================================================================
--- lxc.orig/src/lxc/lxc_cgroup.c
+++ lxc/src/lxc/lxc_cgroup.c
@@ -31,7 +31,7 @@
 
 #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)
 {
Index: lxc/src/lxc/lxc_checkpoint.c
===================================================================
--- lxc.orig/src/lxc/lxc_checkpoint.c
+++ lxc/src/lxc/lxc_checkpoint.c
@@ -35,7 +35,7 @@
 #include "arguments.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)
 {
Index: lxc/src/lxc/lxc_console.c
===================================================================
--- lxc.orig/src/lxc/lxc_console.c
+++ lxc/src/lxc/lxc_console.c
@@ -44,7 +44,7 @@
 
 #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)
 {
Index: lxc/src/lxc/lxc_execute.c
===================================================================
--- lxc.orig/src/lxc/lxc_execute.c
+++ lxc/src/lxc/lxc_execute.c
@@ -39,7 +39,7 @@
 #include "arguments.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)
 {
Index: lxc/src/lxc/lxc_monitor.c
===================================================================
--- lxc.orig/src/lxc/lxc_monitor.c
+++ lxc/src/lxc/lxc_monitor.c
@@ -33,7 +33,7 @@
 #include <lxc/monitor.h>
 #include "arguments.h"
 
-lxc_log_define(monitor, lxc);
+lxc_log_define(lxc_monitor_ui, lxc_monitor);
 
 static const struct option my_longopts[] = {
 	LXC_COMMON_OPTIONS
Index: lxc/src/lxc/lxc_restart.c
===================================================================
--- lxc.orig/src/lxc/lxc_restart.c
+++ lxc/src/lxc/lxc_restart.c
@@ -32,7 +32,7 @@
 
 #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)
 {
Index: lxc/src/lxc/lxc_start.c
===================================================================
--- lxc.orig/src/lxc/lxc_start.c
+++ lxc/src/lxc/lxc_start.c
@@ -48,7 +48,7 @@
 #include "confile.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)
 {
Index: lxc/src/lxc/lxc_unshare.c
===================================================================
--- lxc.orig/src/lxc/lxc_unshare.c
+++ lxc/src/lxc/lxc_unshare.c
@@ -35,7 +35,7 @@
 #include <lxc/log.h>
 #include <lxc/namespace.h>
 
-lxc_log_define(lxc_unshare, lxc);
+lxc_log_define(lxc_unshare_ui, lxc);
 
 void usage(char *cmd)
 {
Index: lxc/src/lxc/lxc_wait.c
===================================================================
--- lxc.orig/src/lxc/lxc_wait.c
+++ lxc/src/lxc/lxc_wait.c
@@ -31,7 +31,7 @@
 #include <lxc/monitor.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)
 {



