Unverified Commit 18322934 by AustinReichert Committed by Christian Brauner

tools/lxc_freeze: remove internal logging

parent 8ab75ebe
...@@ -33,8 +33,6 @@ ...@@ -33,8 +33,6 @@
#include "arguments.h" #include "arguments.h"
lxc_log_define(lxc_freeze_ui, lxc);
static const struct option my_longopts[] = { static const struct option my_longopts[] = {
LXC_COMMON_OPTIONS LXC_COMMON_OPTIONS
}; };
...@@ -78,33 +76,33 @@ int main(int argc, char *argv[]) ...@@ -78,33 +76,33 @@ int main(int argc, char *argv[])
c = lxc_container_new(my_args.name, my_args.lxcpath[0]); c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
if (!c) { if (!c) {
ERROR("No such container: %s:%s", my_args.lxcpath[0], my_args.name); fprintf(stderr, "No such container: %s:%s\n", my_args.lxcpath[0], my_args.name);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
if (my_args.rcfile) { if (my_args.rcfile) {
c->clear_config(c); c->clear_config(c);
if (!c->load_config(c, my_args.rcfile)) { if (!c->load_config(c, my_args.rcfile)) {
ERROR("Failed to load rcfile"); fprintf(stderr, "Failed to load rcfile\n");
lxc_container_put(c); lxc_container_put(c);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
c->configfile = strdup(my_args.rcfile); c->configfile = strdup(my_args.rcfile);
if (!c->configfile) { if (!c->configfile) {
ERROR("Out of memory setting new config filename"); fprintf(stderr, "Out of memory setting new config filename\n");
lxc_container_put(c); lxc_container_put(c);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
} }
if (!c->may_control(c)) { if (!c->may_control(c)) {
ERROR("Insufficent privileges to control %s:%s", my_args.lxcpath[0], my_args.name); fprintf(stderr, "Insufficent privileges to control %s:%s\n", my_args.lxcpath[0], my_args.name);
lxc_container_put(c); lxc_container_put(c);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
if (!c->freeze(c)) { if (!c->freeze(c)) {
ERROR("Failed to freeze %s:%s", my_args.lxcpath[0], my_args.name); fprintf(stderr, "Failed to freeze %s:%s\n", my_args.lxcpath[0], my_args.name);
lxc_container_put(c); lxc_container_put(c);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
......
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