From aba311f7ffb1370156f48061a5fdc2da9551e57f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 4 Dec 2018 10:56:44 +0100 Subject: generators: configure logging before the first use --- src/gpt-auto-generator/gpt-auto-generator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gpt-auto-generator') diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index d188927398..80e7bb671f 100644 --- a/src/gpt-auto-generator/gpt-auto-generator.c +++ b/src/gpt-auto-generator/gpt-auto-generator.c @@ -671,6 +671,8 @@ static int add_mounts(void) { int main(int argc, char *argv[]) { int r, k; + log_setup_generator(); + if (argc > 1 && argc != 4) { log_error("This program takes three or no arguments."); return EXIT_FAILURE; @@ -679,8 +681,6 @@ int main(int argc, char *argv[]) { if (argc > 1) arg_dest = argv[3]; - log_setup_generator(); - if (detect_container() > 0) { log_debug("In a container, exiting."); return EXIT_SUCCESS; -- cgit v1.2.1