]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
tools: lxc-unfreeze: share internal API symbols
author2xsec <dh48.jeong@samsung.com>
Thu, 28 Jun 2018 14:03:55 +0000 (23:03 +0900)
committer2xsec <dh48.jeong@samsung.com>
Thu, 28 Jun 2018 14:03:55 +0000 (23:03 +0900)
Signed-off-by: 2xsec <dh48.jeong@samsung.com>
src/lxc/Makefile.am
src/lxc/tools/lxc_unfreeze.c

index 4afb3f0c76c8b8292ce3e1bcfd058fbdd9102859..8324eb1fe225ed2e367a853ee209d76cf1c64632 100644 (file)
@@ -281,7 +281,7 @@ lxc_copy_SOURCES = tools/lxc_copy.c tools/arguments.c tools/tool_utils.c
 lxc_start_SOURCES = tools/lxc_start.c tools/arguments.c
 lxc_stop_SOURCES = tools/lxc_stop.c tools/arguments.c
 lxc_top_SOURCES = tools/lxc_top.c tools/arguments.c tools/tool_utils.c
-lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c tools/arguments.c tools/tool_utils.c
+lxc_unfreeze_SOURCES = tools/lxc_unfreeze.c tools/arguments.c
 lxc_unshare_SOURCES = tools/lxc_unshare.c tools/arguments.c tools/tool_utils.c
 lxc_wait_SOURCES = tools/lxc_wait.c tools/arguments.c tools/tool_utils.c
 lxc_create_SOURCES = tools/lxc_create.c tools/arguments.c tools/tool_utils.c
index 81aa05c19f5fcb4a28a27ca6af7f64c83246a503..a0b56900f3480d5a5165b0a8c39ee35fee6ffdab 100644 (file)
@@ -31,7 +31,9 @@
 #include <lxc/lxccontainer.h>
 
 #include "arguments.h"
-#include "tool_utils.h"
+#include "log.h"
+
+lxc_log_define(lxc_unfreeze, lxc);
 
 static const struct option my_longopts[] = {
        LXC_COMMON_OPTIONS
@@ -75,12 +77,12 @@ int main(int argc, char *argv[])
 
        c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
        if (!c) {
-               lxc_error(&my_args, "No such container: %s:%s", my_args.lxcpath[0], my_args.name);
+               ERROR("No such container: %s:%s", my_args.lxcpath[0], my_args.name);
                exit(EXIT_FAILURE);
        }
 
        if (!c->may_control(c)) {
-               lxc_error(&my_args, "Insufficent privileges to control %s:%s", my_args.lxcpath[0], my_args.name);
+               ERROR("Insufficent privileges to control %s:%s", my_args.lxcpath[0], my_args.name);
                lxc_container_put(c);
                exit(EXIT_FAILURE);
        }
@@ -89,21 +91,21 @@ int main(int argc, char *argv[])
                c->clear_config(c);
 
                if (!c->load_config(c, my_args.rcfile)) {
-                       lxc_error(&my_args, "Failed to load rcfile");
+                       ERROR("Failed to load rcfile");
                        lxc_container_put(c);
                        exit(EXIT_FAILURE);
                }
 
                c->configfile = strdup(my_args.rcfile);
                if (!c->configfile) {
-                       lxc_error(&my_args, "Out of memory setting new config filename");
+                       ERROR("Out of memory setting new config filename");
                        lxc_container_put(c);
                        exit(EXIT_FAILURE);
                }
        }
 
        if (!c->unfreeze(c)) {
-               lxc_error(&my_args, "Failed to unfreeze %s:%s", my_args.lxcpath[0], my_args.name);
+               ERROR("Failed to unfreeze %s:%s", my_args.lxcpath[0], my_args.name);
                lxc_container_put(c);
                exit(EXIT_FAILURE);
        }