[lxc-devel] [lxc/master] tools/lxc_unfreeze: removed internal logging

AustinReichert on Github lxc-bot at linuxcontainers.org
Wed Nov 29 00:00:07 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/60030496/attachment.bin>
-------------- next part --------------
From feb34020235fcd4d668e3dfa0912d00581986e95 Mon Sep 17 00:00:00 2001
From: AustinReichert <austinskyreichert at utexas.edu>
Date: Tue, 28 Nov 2017 17:38:48 -0600
Subject: [PATCH] tools/lxc_unfreeze: removed internal logging

Signed-off-by: AustinReichert <austinskyreichert at utexas.edu>
---
 src/lxc/tools/lxc_unfreeze.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/lxc/tools/lxc_unfreeze.c b/src/lxc/tools/lxc_unfreeze.c
index 221337400..5027d28e6 100644
--- a/src/lxc/tools/lxc_unfreeze.c
+++ b/src/lxc/tools/lxc_unfreeze.c
@@ -31,8 +31,6 @@
 #include "log.h"
 #include "arguments.h"
 
-lxc_log_define(lxc_unfreeze_ui, lxc);
-
 static const struct option my_longopts[] = {
 	LXC_COMMON_OPTIONS
 };
@@ -80,12 +78,12 @@ 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 (!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);
 	}
@@ -93,20 +91,20 @@ int main(int argc, char *argv[])
 	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->unfreeze(c)) {
-		ERROR("Failed to unfreeze %s:%s", my_args.lxcpath[0], my_args.name);
+		fprintf(stderr, "Failed to unfreeze %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