]> git.proxmox.com Git - mirror_lxc.git/blobdiff - src/lxc/commands_utils.c
conf, confile: add parsing of a shmounts config parameter
[mirror_lxc.git] / src / lxc / commands_utils.c
index 12b13170789bbf2bdf5e6e9b3dcce5176793e199..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)
 {
@@ -69,13 +69,10 @@ again:
                        goto again;
                }
 
-               ERROR("Failed to receive message: %s", strerror(errno));
+               SYSERROR("Failed to receive message");
                return -1;
        }
 
-       if (ret < 0)
-               return -1;
-
        TRACE("Received state %s from state client %d",
              lxc_state2str(msg.value), state_client_fd);
 
@@ -211,14 +208,11 @@ int lxc_add_state_client(int state_client_fd, struct lxc_handler *handler,
                return -ENOMEM;
        }
 
-       process_lock();
        state = handler->state;
        if (states[state] != 1) {
                lxc_list_add_elem(tmplist, newclient);
                lxc_list_add_tail(&handler->conf->state_clients, tmplist);
-               process_unlock();
        } else {
-               process_unlock();
                free(newclient);
                free(tmplist);
                return state;