]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
conf: use lxc_log_trace()
authorChristian Brauner <christian.brauner@ubuntu.com>
Mon, 1 Feb 2021 21:53:56 +0000 (22:53 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 1 Feb 2021 21:53:56 +0000 (22:53 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c

index f37d35c3bada9288741c4b2f0062431af681bc37..97b601e015e96f48db487b2a4cfaec95fd282698 100644 (file)
@@ -4112,8 +4112,7 @@ int userns_exec_1(const struct lxc_conf *conf, int (*fn)(void *), void *data,
 
        close_prot_errno_disarm(pipe_fds[0]);
 
-       if (lxc_log_get_level() == LXC_LOG_LEVEL_TRACE ||
-           conf->loglevel == LXC_LOG_LEVEL_TRACE) {
+       if (lxc_log_trace()) {
                struct id_map *map;
                struct lxc_list *it;
 
@@ -4227,8 +4226,7 @@ int userns_exec_minimal(const struct lxc_conf *conf,
 
        close_prot_errno_disarm(sock_fds[0]);
 
-       if (lxc_log_get_level() == LXC_LOG_LEVEL_TRACE ||
-           conf->loglevel == LXC_LOG_LEVEL_TRACE) {
+       if (lxc_log_trace()) {
                struct id_map *map;
                struct lxc_list *it;
 
@@ -4412,8 +4410,7 @@ int userns_exec_full(struct lxc_conf *conf, int (*fn)(void *), void *data,
        /* idmap will now keep track of that memory. */
        host_gid_map = NULL;
 
-       if (lxc_log_get_level() == LXC_LOG_LEVEL_TRACE ||
-           conf->loglevel == LXC_LOG_LEVEL_TRACE) {
+       if (lxc_log_trace()) {
                lxc_list_for_each (cur, idmap) {
                        map = cur->elem;
                        TRACE("establishing %cid mapping for \"%d\" in new "
@@ -4634,8 +4631,7 @@ int userns_exec_mapped_root(const char *path, int path_fd,
 
        close_prot_errno_disarm(sock_fds[0]);
 
-       if (lxc_log_get_level() == LXC_LOG_LEVEL_TRACE ||
-           conf->loglevel == LXC_LOG_LEVEL_TRACE) {
+       if (lxc_log_trace()) {
                struct id_map *map;
                struct lxc_list *it;