]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tree-wide: remove unneeded log prefixes
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 1 Jul 2018 20:16:08 +0000 (22:16 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 3 Jul 2018 10:48:13 +0000 (12:48 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
31 files changed:
src/lxc/af_unix.c
src/lxc/attach.c
src/lxc/caps.c
src/lxc/cgroups/cgfsng.c
src/lxc/cgroups/cgroup.c
src/lxc/commands.c
src/lxc/commands_utils.c
src/lxc/conf.c
src/lxc/confile.c
src/lxc/confile_utils.c
src/lxc/criu.c
src/lxc/error.c
src/lxc/execute.c
src/lxc/freezer.c
src/lxc/initutils.c
src/lxc/log.c
src/lxc/lsm/apparmor.c
src/lxc/lsm/lsm.c
src/lxc/lsm/selinux.c
src/lxc/lxccontainer.c
src/lxc/lxclock.c
src/lxc/monitor.c
src/lxc/namespace.c
src/lxc/network.c
src/lxc/parse.c
src/lxc/seccomp.c
src/lxc/start.c
src/lxc/state.c
src/lxc/sync.c
src/lxc/tools/arguments.c
src/lxc/utils.c

index 002f944cee8e1c959b80bce0517ae9074dfc13e2..86f1fe9fdf62864cb72753701fff226939262622 100644 (file)
@@ -40,7 +40,7 @@
 #include "include/strlcpy.h"
 #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)
 {
index bc98f67c5c6784921210350fb672dc857a40bc36..afb4e0bc0fe12ea25aabcba87ced72ce48b412cb 100644 (file)
@@ -87,7 +87,7 @@
 #define MS_SLAVE (1 << 19)
 #endif
 
-lxc_log_define(lxc_attach, lxc);
+lxc_log_define(attach, lxc);
 
 /* /proc/pid-to-str/status\0 = (5 + 21 + 7 + 1) */
 #define __PROC_STATUS_LEN (5 + (LXC_NUMSTRLEN64) + 7 + 1)
index 7b1848f63fc5c130a9f75330fe81e3c892764d8f..ae5d7ef16f036f8f7ccc8105d655f524dafd5c6c 100644 (file)
@@ -34,7 +34,7 @@
 #include "caps.h"
 #include "log.h"
 
-lxc_log_define(lxc_caps, lxc);
+lxc_log_define(caps, lxc);
 
 #if HAVE_LIBCAP
 
index 3cc9f9f628889192926448d640337804f4fd693f..6d472d6a7d337c7ef8557b4445fc368789a592e1 100644 (file)
@@ -66,7 +66,7 @@
 #include "include/strlcat.h"
 #endif
 
-lxc_log_define(lxc_cgfsng, lxc);
+lxc_log_define(cgfsng, cgroup);
 
 static void free_string_list(char **clist)
 {
index cd67c3c5de7836a619728c177a8a81813c7cc8f4..754fdcae37f18407442b5c9acdb423ab712de084 100644 (file)
@@ -30,7 +30,7 @@
 #include "log.h"
 #include "start.h"
 
-lxc_log_define(lxc_cgroup, lxc);
+lxc_log_define(cgroup, lxc);
 
 extern struct cgroup_ops *cgfsng_ops_init(void);
 
index 22275277bf0e3125d4d7a6cea6543b5c495f81a0..618b3089d2f0f8a8d341039e2f5d78dcd41c355b 100644 (file)
@@ -76,7 +76,7 @@
  * container.
  */
 
-lxc_log_define(lxc_commands, lxc);
+lxc_log_define(commands, lxc);
 
 static const char *lxc_cmd_str(lxc_cmd_t cmd)
 {
index 03e481f09b168af5f222b51fbbaa0f725733910b..f278800323e02342c2175aab844a89cacede3f70 100644 (file)
@@ -38,7 +38,7 @@
 #include "state.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)
 {
index bb483522db68346edb6883d6473af6bc06e4a84d..5f060fe18c08da2ec09721dffe54a52250fa72ed 100644 (file)
 #define MS_LAZYTIME (1<<25)
 #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.
  * This is used in the error calls.
index 7cb1fbb16a3c6dc003b71b6abbbc8e1ea09facd6..4365264e932ed5a668b47b3ab10dec98c4deaa2d 100644 (file)
@@ -73,7 +73,7 @@
 #include "include/strlcat.h"
 #endif
 
-lxc_log_define(lxc_confile, lxc);
+lxc_log_define(confile, lxc);
 
 #define lxc_config_define(name)                                                \
        static int set_config_##name(const char *, const char *,               \
index a68c6ffd06109850b16adb94ac8880bcf42f2bab..8100cf741f72142ff956efc3a04441182bf3cbb6 100644 (file)
@@ -40,7 +40,7 @@
 #include "include/strlcpy.h"
 #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,
                 unsigned long *hostid, unsigned long *range)
index 41b0c027fdc00ab84a808ccfeabc87774cc0fbcd..c36421627e36ada36e4053fdd1b4c2a8df990e60 100644 (file)
@@ -63,7 +63,7 @@
 #define CRIU_IN_FLIGHT_SUPPORT "2.4"
 #define CRIU_EXTERNAL_NOT_VETH "2.8"
 
-lxc_log_define(lxc_criu, lxc);
+lxc_log_define(criu, lxc);
 
 struct criu_opts {
        /* the thing to hook to stdout and stderr for logging */
index 9147a6afb7dbf328994842d4095264fabcd05746..769dedc4059da3dd1fdbc7bcc6a19fb749f8bb67 100644 (file)
@@ -28,7 +28,7 @@
 #include "error.h"
 #include "log.h"
 
-lxc_log_define(lxc_error, lxc);
+lxc_log_define(error, lxc);
 
 /*---------------------------------------------------------------------------*/
 /* lxc_error_set_and_log
index 1a87b2321b6c2248b18936638cacf606ad11716d..d01df6b2e7404d716136b240c86fbad54ec75e16 100644 (file)
@@ -34,7 +34,7 @@
 #include "start.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)
 {
index 5665aee8e39bbdb903f57b44d438887cdc0c20db..2103b50b9148429390e55d34efd79996c47c9633 100644 (file)
@@ -40,7 +40,7 @@
 #include "parse.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)
 {
index 4ca2ce1976599eb90cce87fc785a77fc4f08d824..6ab39a7da6c2791890a98c3b80797ae6c1a03836 100644 (file)
@@ -31,7 +31,7 @@
 #include "include/strlcpy.h"
 #endif
 
-lxc_log_define(lxc_initutils, lxc);
+lxc_log_define(initutils, lxc);
 
 static char *copy_global_config_value(char *p)
 {
index a3ce9f3677a3803cb6d5569c60344514735d91de..8e7de7c8d150cac9f464e22c15df534fb4ff0fed 100644 (file)
@@ -66,7 +66,7 @@ static char log_prefix[LXC_LOG_PREFIX_SIZE] = "lxc";
 static char *log_fname = 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)
 {
index 793d13f76341e1200e2759e7f50333aecfdd7f2e..1507917c84426965ea7e1fc72c97939157dcc56e 100644 (file)
@@ -33,7 +33,7 @@
 #include "conf.h"
 #include "utils.h"
 
-lxc_log_define(lxc_apparmor, lxc);
+lxc_log_define(apparmor, lsm);
 
 /* set by lsm_apparmor_drv_init if true */
 static int aa_enabled = 0;
index 3f71cdd73f64ec474c38423ef6299b0caad15f8c..f4500ae20e986c027a94f1d5ccbbff04caff17d3 100644 (file)
@@ -32,7 +32,7 @@
 #include "log.h"
 #include "lsm.h"
 
-lxc_log_define(lxc_lsm, lxc);
+lxc_log_define(lsm, lxc);
 
 static struct lsm_drv *drv = NULL;
 
index 1d8ce4cbadd19a262251c5a18b3b76f2bb824b6c..c88c18e3d7771a7258ae838c65de286c0d5abc73 100644 (file)
@@ -36,7 +36,7 @@
 
 #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
index c5ea78770f6925d1c6aa6eae0e96acfbc444449f..ce01f13e9cd8163e822a810a5ed04a43fdb0b7ad 100644 (file)
@@ -104,7 +104,7 @@ static int faccessat(int __fd, const char *__file, int __type, int __flag)
 }
 #endif
 
-lxc_log_define(lxc_container, lxc);
+lxc_log_define(lxccontainer, lxc);
 
 static bool do_lxcapi_destroy(struct lxc_container *c);
 static const char *lxcapi_get_config_path(struct lxc_container *c);
index 08c96e0b14fbc60403d39f1c1f2c727533c9e3c5..29675fb597069584e8d82e977aad5b3c8fb0ed0b 100644 (file)
@@ -40,7 +40,7 @@
 
 #define MAX_STACKDEPTH 25
 
-lxc_log_define(lxc_lock, lxc);
+lxc_log_define(lxclock, lxc);
 
 #ifdef MUTEX_DEBUGGING
 static pthread_mutex_t thread_mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;
index 4bbf679db9f40370e8b57924c95b27dce176869e..d9f10c40b697f25eebd613f3391e67f5b78a25d1 100644 (file)
@@ -54,7 +54,7 @@
 #include "include/strlcpy.h"
 #endif
 
-lxc_log_define(lxc_monitor, lxc);
+lxc_log_define(monitor, lxc);
 
 /* routines used by monitor publishers (containers) */
 int lxc_monitor_fifo_name(const char *lxcpath, char *fifo_path, size_t fifo_path_sz,
index a169f83dea948a9dfb0bba081eb736cbed2e0c27..2459c9d2ec7bed6bbe8491a2c40811e29a10d918 100644 (file)
@@ -37,7 +37,7 @@
 #include "namespace.h"
 #include "utils.h"
 
-lxc_log_define(lxc_namespace, lxc);
+lxc_log_define(namespace, lxc);
 
 struct clone_arg {
        int (*fn)(void *);
index e59b85d6232bae7a9dda638506248f26e1452ef3..c9497afa4a091798738dd2a6db090ae58bde6f42 100644 (file)
@@ -95,7 +95,7 @@
 #define IFLA_MACVLAN_MODE 1
 #endif
 
-lxc_log_define(lxc_network, lxc);
+lxc_log_define(network, lxc);
 
 typedef int (*instantiate_cb)(struct lxc_handler *, struct lxc_netdev *);
 
index a1025c5afc23fe6908d0f966f754cf97146842b4..bc209347c7b022b443959620d3271766d73f472b 100644 (file)
@@ -35,7 +35,7 @@
 #include "utils.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,
                  off_t offset)
index 81abf62ee6b0e5a73598442103486c6f2696a1e5..c8f2b3f3b3040cb8a353a43467c163b8daeb8948 100644 (file)
@@ -42,7 +42,7 @@
 #define MIPS_ARCH_N64 lxc_seccomp_arch_mips64
 #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)
 {
index a0bcd80bbfb31d785b356ee99d77dae577ba6446..953722261f45225e2c483368e510baf3d7d000a0 100644 (file)
@@ -94,7 +94,7 @@
 #include "include/strlcpy.h"
 #endif
 
-lxc_log_define(lxc_start, lxc);
+lxc_log_define(start, lxc);
 
 extern void mod_all_rdeps(struct lxc_container *c, bool inc);
 static bool do_destroy_container(struct lxc_handler *handler);
index 12fd65386ba4dbf2cbed5fd7438134aa9fab7763..3ccbe583ab1610c7d4578034c1402d4e30b61820 100644 (file)
@@ -44,7 +44,7 @@
 #include "monitor.h"
 #include "start.h"
 
-lxc_log_define(lxc_state, lxc);
+lxc_log_define(state, lxc);
 
 static const char *const strstate[] = {
     "STOPPED",  "STARTING", "RUNNING", "STOPPING",
index 62512eec77537499a5d43c900c1aef8fc42ea769..53fae06c05d39a30da52e8fcd017e2eba9cb152c 100644 (file)
@@ -32,7 +32,7 @@
 #include "log.h"
 #include "start.h"
 
-lxc_log_define(lxc_sync, lxc);
+lxc_log_define(sync, lxc);
 
 static int __sync_wait(int fd, int sequence)
 {
index 5e2387a9e5e8b6e498b9d9a305d728811871faa6..daff4d816c96e9c21781a925c1658f45601c724f 100644 (file)
@@ -38,6 +38,7 @@
 
 #include "arguments.h"
 #include "namespace.h"
+#include "initutils.h"
 
 static int build_shortopts(const struct option *a_options, char *a_shortopts,
                           size_t a_size)
@@ -186,13 +187,6 @@ static int lxc_arguments_lxcpath_add(struct lxc_arguments *args,
        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,
                               char *const argv[])
 {
index e2ee8229d55a5b52698d358f11b9a1f37179c5cf..6bb05df000ef5799e46eda62ea29b87cc437903d 100644 (file)
@@ -67,7 +67,7 @@
 #define O_NOFOLLOW  00400000
 #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