diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2011-04-03 18:16:48 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-04-03 22:15:58 +0200 |
commit | 8fb81fa7844387377f79cf11d1bf48224a928ba7 (patch) | |
tree | 162f9f6d387c7fe381579f1065d754a5217f4864 | |
parent | initctl: /dev/initctl is a named pipe, not a socket (diff) | |
download | systemd-8fb81fa7844387377f79cf11d1bf48224a928ba7.tar.gz systemd-8fb81fa7844387377f79cf11d1bf48224a928ba7.tar.bz2 systemd-8fb81fa7844387377f79cf11d1bf48224a928ba7.zip |
condition: fix dumping of conditions
Several condition types were missing their strings, they were showing as
"(null)" in systemctl dump.
Indentation was missing too.
-rw-r--r-- | src/condition.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/condition.c b/src/condition.c index b404b49c9..5ab77d80f 100644 --- a/src/condition.c +++ b/src/condition.c @@ -199,7 +199,7 @@ void condition_dump(Condition *c, FILE *f, const char *prefix) { prefix = ""; fprintf(f, - "%s%s: %s%s%s\n", + "%s\t%s: %s%s%s\n", prefix, condition_type_to_string(c->type), c->trigger ? "|" : "", @@ -215,8 +215,11 @@ void condition_dump_list(Condition *first, FILE *f, const char *prefix) { } static const char* const condition_type_table[_CONDITION_TYPE_MAX] = { - [CONDITION_KERNEL_COMMAND_LINE] = "ConditionKernelCommandLine", [CONDITION_PATH_EXISTS] = "ConditionPathExists", + [CONDITION_PATH_IS_DIRECTORY] = "ConditionPathIsDirectory", + [CONDITION_DIRECTORY_NOT_EMPTY] = "ConditionDirectoryNotEmpty", + [CONDITION_KERNEL_COMMAND_LINE] = "ConditionKernelCommandLine", + [CONDITION_VIRTUALIZATION] = "ConditionVirtualization", [CONDITION_NULL] = "ConditionNull" }; |