[lxc-devel] [lxc/master] tools/lxc_freeze: remove internal logging
AustinReichert on Github
lxc-bot at linuxcontainers.org
Wed Nov 29 00:06:27 UTC 2017
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 361 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20171129/3b265bdf/attachment.bin>
-------------- next part --------------
From 517c7681591e16c8d4ccf9853d39c348831c0d6e Mon Sep 17 00:00:00 2001
From: AustinReichert <austinskyreichert at utexas.edu>
Date: Tue, 28 Nov 2017 03:32:50 -0600
Subject: [PATCH] tools/lxc_freeze: remove internal logging
Signed-off-by: AustinReichert <austinskyreichert at utexas.edu>
---
src/lxc/tools/lxc_freeze.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/lxc/tools/lxc_freeze.c b/src/lxc/tools/lxc_freeze.c
index c96ff892e..aab2b6fe3 100644
--- a/src/lxc/tools/lxc_freeze.c
+++ b/src/lxc/tools/lxc_freeze.c
@@ -33,8 +33,6 @@
#include "arguments.h"
-lxc_log_define(lxc_freeze_ui, lxc);
-
static const struct option my_longopts[] = {
LXC_COMMON_OPTIONS
};
@@ -81,33 +79,33 @@ int main(int argc, char *argv[])
c = lxc_container_new(my_args.name, my_args.lxcpath[0]);
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);
}
if (my_args.rcfile) {
c->clear_config(c);
if (!c->load_config(c, my_args.rcfile)) {
- ERROR("Failed to load rcfile");
+ fprintf(stderr, "Failed to load rcfile\n");
lxc_container_put(c);
exit(EXIT_FAILURE);
}
c->configfile = strdup(my_args.rcfile);
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);
exit(EXIT_FAILURE);
}
}
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);
exit(EXIT_FAILURE);
}
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);
exit(EXIT_FAILURE);
}
More information about the lxc-devel
mailing list