generators: configure logging before the first use

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2018-12-12 10:48:38 +01:00
parent f7e81fd96f
commit aba311f7ff
7 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -583,14 +583,14 @@ DEFINE_PRIVATE_HASH_OPS_WITH_VALUE_DESTRUCTOR(crypt_device_hash_ops, char, strin
static int run(int argc, char *argv[]) {
int r;
log_setup_generator();
if (argc > 1 && argc != 4)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "This program takes three or no arguments.");
if (argc > 1)
arg_dest = argv[1];
log_setup_generator();
arg_disks = hashmap_new(&crypt_device_hash_ops);
if (!arg_disks)
return log_oom();