tree-wide: remove unneeded log prefixes

parent 9b937486
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include "include/strlcpy.h" #include "include/strlcpy.h"
#endif #endif
lxc_log_define(lxc_af_unix, lxc); lxc_log_define(af_unix, lxc);
int lxc_abstract_unix_open(const char *path, int type, int flags) int lxc_abstract_unix_open(const char *path, int type, int flags)
{ {
......
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
#define MS_SLAVE (1 << 19) #define MS_SLAVE (1 << 19)
#endif #endif
lxc_log_define(lxc_attach, lxc); lxc_log_define(attach, lxc);
/* /proc/pid-to-str/status\0 = (5 + 21 + 7 + 1) */ /* /proc/pid-to-str/status\0 = (5 + 21 + 7 + 1) */
#define __PROC_STATUS_LEN (5 + (LXC_NUMSTRLEN64) + 7 + 1) #define __PROC_STATUS_LEN (5 + (LXC_NUMSTRLEN64) + 7 + 1)
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "caps.h" #include "caps.h"
#include "log.h" #include "log.h"
lxc_log_define(lxc_caps, lxc); lxc_log_define(caps, lxc);
#if HAVE_LIBCAP #if HAVE_LIBCAP
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
#include "include/strlcat.h" #include "include/strlcat.h"
#endif #endif
lxc_log_define(lxc_cgfsng, lxc); lxc_log_define(cgfsng, cgroup);
static void free_string_list(char **clist) static void free_string_list(char **clist)
{ {
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "log.h" #include "log.h"
#include "start.h" #include "start.h"
lxc_log_define(lxc_cgroup, lxc); lxc_log_define(cgroup, lxc);
extern struct cgroup_ops *cgfsng_ops_init(void); extern struct cgroup_ops *cgfsng_ops_init(void);
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
* container. * container.
*/ */
lxc_log_define(lxc_commands, lxc); lxc_log_define(commands, lxc);
static const char *lxc_cmd_str(lxc_cmd_t cmd) static const char *lxc_cmd_str(lxc_cmd_t cmd)
{ {
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
#include "state.h" #include "state.h"
#include "utils.h" #include "utils.h"
lxc_log_define(lxc_commands_utils, lxc); lxc_log_define(commands_utils, lxc);
int lxc_cmd_sock_rcv_state(int state_client_fd, int timeout) int lxc_cmd_sock_rcv_state(int state_client_fd, int timeout)
{ {
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
#define MS_LAZYTIME (1<<25) #define MS_LAZYTIME (1<<25)
#endif #endif
lxc_log_define(lxc_conf, lxc); lxc_log_define(conf, lxc);
/* The lxc_conf of the container currently being worked on in an API call. /* The lxc_conf of the container currently being worked on in an API call.
* This is used in the error calls. * This is used in the error calls.
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
#include "include/strlcat.h" #include "include/strlcat.h"
#endif #endif
lxc_log_define(lxc_confile, lxc); lxc_log_define(confile, lxc);
#define lxc_config_define(name) \ #define lxc_config_define(name) \
static int set_config_##name(const char *, const char *, \ static int set_config_##name(const char *, const char *, \
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include "include/strlcpy.h" #include "include/strlcpy.h"
#endif #endif
lxc_log_define(lxc_confile_utils, lxc); lxc_log_define(confile_utils, lxc);
int parse_idmaps(const char *idmap, char *type, unsigned long *nsid, int parse_idmaps(const char *idmap, char *type, unsigned long *nsid,
unsigned long *hostid, unsigned long *range) unsigned long *hostid, unsigned long *range)
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
#define CRIU_IN_FLIGHT_SUPPORT "2.4" #define CRIU_IN_FLIGHT_SUPPORT "2.4"
#define CRIU_EXTERNAL_NOT_VETH "2.8" #define CRIU_EXTERNAL_NOT_VETH "2.8"
lxc_log_define(lxc_criu, lxc); lxc_log_define(criu, lxc);
struct criu_opts { struct criu_opts {
/* the thing to hook to stdout and stderr for logging */ /* the thing to hook to stdout and stderr for logging */
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "error.h" #include "error.h"
#include "log.h" #include "log.h"
lxc_log_define(lxc_error, lxc); lxc_log_define(error, lxc);
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
/* lxc_error_set_and_log /* lxc_error_set_and_log
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "start.h" #include "start.h"
#include "utils.h" #include "utils.h"
lxc_log_define(lxc_execute, lxc_start); lxc_log_define(execute, start);
static int execute_start(struct lxc_handler *handler, void* data) static int execute_start(struct lxc_handler *handler, void* data)
{ {
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include "parse.h" #include "parse.h"
#include "state.h" #include "state.h"
lxc_log_define(lxc_freezer, lxc); lxc_log_define(freezer, lxc);
static int do_freeze_thaw(bool freeze, const char *name, const char *lxcpath) static int do_freeze_thaw(bool freeze, const char *name, const char *lxcpath)
{ {
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#include "include/strlcpy.h" #include "include/strlcpy.h"
#endif #endif
lxc_log_define(lxc_initutils, lxc); lxc_log_define(initutils, lxc);
static char *copy_global_config_value(char *p) static char *copy_global_config_value(char *p)
{ {
......
...@@ -66,7 +66,7 @@ static char log_prefix[LXC_LOG_PREFIX_SIZE] = "lxc"; ...@@ -66,7 +66,7 @@ static char log_prefix[LXC_LOG_PREFIX_SIZE] = "lxc";
static char *log_fname = NULL; static char *log_fname = NULL;
static char *log_vmname = NULL; static char *log_vmname = NULL;
lxc_log_define(lxc_log, lxc); lxc_log_define(log, lxc);
static int lxc_log_priority_to_syslog(int priority) static int lxc_log_priority_to_syslog(int priority)
{ {
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "conf.h" #include "conf.h"
#include "utils.h" #include "utils.h"
lxc_log_define(lxc_apparmor, lxc); lxc_log_define(apparmor, lsm);
/* set by lsm_apparmor_drv_init if true */ /* set by lsm_apparmor_drv_init if true */
static int aa_enabled = 0; static int aa_enabled = 0;
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "log.h" #include "log.h"
#include "lsm.h" #include "lsm.h"
lxc_log_define(lxc_lsm, lxc); lxc_log_define(lsm, lxc);
static struct lsm_drv *drv = NULL; static struct lsm_drv *drv = NULL;
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#define DEFAULT_LABEL "unconfined_t" #define DEFAULT_LABEL "unconfined_t"
lxc_log_define(lxc_lsm_selinux, lxc); lxc_log_define(selinux, lsm);
/* /*
* selinux_process_label_get: Get SELinux context of a process * selinux_process_label_get: Get SELinux context of a process
......
...@@ -104,7 +104,7 @@ static int faccessat(int __fd, const char *__file, int __type, int __flag) ...@@ -104,7 +104,7 @@ static int faccessat(int __fd, const char *__file, int __type, int __flag)
} }
#endif #endif
lxc_log_define(lxc_container, lxc); lxc_log_define(lxccontainer, lxc);
static bool do_lxcapi_destroy(struct lxc_container *c); static bool do_lxcapi_destroy(struct lxc_container *c);
static const char *lxcapi_get_config_path(struct lxc_container *c); static const char *lxcapi_get_config_path(struct lxc_container *c);
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#define MAX_STACKDEPTH 25 #define MAX_STACKDEPTH 25
lxc_log_define(lxc_lock, lxc); lxc_log_define(lxclock, lxc);
#ifdef MUTEX_DEBUGGING #ifdef MUTEX_DEBUGGING
static pthread_mutex_t thread_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP; static pthread_mutex_t thread_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#include "include/strlcpy.h" #include "include/strlcpy.h"
#endif #endif
lxc_log_define(lxc_monitor, lxc); lxc_log_define(monitor, lxc);
/* routines used by monitor publishers (containers) */ /* routines used by monitor publishers (containers) */
int lxc_monitor_fifo_name(const char *lxcpath, char *fifo_path, size_t fifo_path_sz, int lxc_monitor_fifo_name(const char *lxcpath, char *fifo_path, size_t fifo_path_sz,
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include "namespace.h" #include "namespace.h"
#include "utils.h" #include "utils.h"
lxc_log_define(lxc_namespace, lxc); lxc_log_define(namespace, lxc);
struct clone_arg { struct clone_arg {
int (*fn)(void *); int (*fn)(void *);
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
#define IFLA_MACVLAN_MODE 1 #define IFLA_MACVLAN_MODE 1
#endif #endif
lxc_log_define(lxc_network, lxc); lxc_log_define(network, lxc);
typedef int (*instantiate_cb)(struct lxc_handler *, struct lxc_netdev *); typedef int (*instantiate_cb)(struct lxc_handler *, struct lxc_netdev *);
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "utils.h" #include "utils.h"
#include "log.h" #include "log.h"
lxc_log_define(lxc_parse, lxc); lxc_log_define(parse, lxc);
void *lxc_strmmap(void *addr, size_t length, int prot, int flags, int fd, void *lxc_strmmap(void *addr, size_t length, int prot, int flags, int fd,
off_t offset) off_t offset)
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#define MIPS_ARCH_N64 lxc_seccomp_arch_mips64 #define MIPS_ARCH_N64 lxc_seccomp_arch_mips64
#endif #endif
lxc_log_define(lxc_seccomp, lxc); lxc_log_define(seccomp, lxc);
static int parse_config_v1(FILE *f, char *line, size_t *line_bufsz, struct lxc_conf *conf) static int parse_config_v1(FILE *f, char *line, size_t *line_bufsz, struct lxc_conf *conf)
{ {
......
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
#include "include/strlcpy.h" #include "include/strlcpy.h"
#endif #endif
lxc_log_define(lxc_start, lxc); lxc_log_define(start, lxc);
extern void mod_all_rdeps(struct lxc_container *c, bool inc); extern void mod_all_rdeps(struct lxc_container *c, bool inc);
static bool do_destroy_container(struct lxc_handler *handler); static bool do_destroy_container(struct lxc_handler *handler);
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#include "monitor.h" #include "monitor.h"
#include "start.h" #include "start.h"
lxc_log_define(lxc_state, lxc); lxc_log_define(state, lxc);
static const char *const strstate[] = { static const char *const strstate[] = {
"STOPPED", "STARTING", "RUNNING", "STOPPING", "STOPPED", "STARTING", "RUNNING", "STOPPING",
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "log.h" #include "log.h"
#include "start.h" #include "start.h"
lxc_log_define(lxc_sync, lxc); lxc_log_define(sync, lxc);
static int __sync_wait(int fd, int sequence) static int __sync_wait(int fd, int sequence)
{ {
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "arguments.h" #include "arguments.h"
#include "namespace.h" #include "namespace.h"
#include "initutils.h"
static int build_shortopts(const struct option *a_options, char *a_shortopts, static int build_shortopts(const struct option *a_options, char *a_shortopts,
size_t a_size) size_t a_size)
...@@ -186,13 +187,6 @@ static int lxc_arguments_lxcpath_add(struct lxc_arguments *args, ...@@ -186,13 +187,6 @@ static int lxc_arguments_lxcpath_add(struct lxc_arguments *args,
return 0; return 0;
} }
void remove_trailing_slashes(char *p)
{
int l = strlen(p);
while (--l >= 0 && (p[l] == '/' || p[l] == '\n'))
p[l] = '\0';
}
extern int lxc_arguments_parse(struct lxc_arguments *args, int argc, extern int lxc_arguments_parse(struct lxc_arguments *args, int argc,
char *const argv[]) char *const argv[])
{ {
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
#define O_NOFOLLOW 00400000 #define O_NOFOLLOW 00400000
#endif #endif
lxc_log_define(lxc_utils, lxc); lxc_log_define(utils, lxc);
/* /*
* if path is btrfs, tries to remove it and any subvolumes beneath it * if path is btrfs, tries to remove it and any subvolumes beneath it
......
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