summaryrefslogtreecommitdiff
path: root/src/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/unit.c')
-rw-r--r--src/unit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/unit.c b/src/unit.c
index 5baea20..429c2ce 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -135,6 +135,13 @@ int unit_load_file(const char *path, Unit *out) {
const char *val = (const char *)event.data.scalar.value;
if (!in_value) {
+ /* Sequence items (logs list) arrive as scalars without a
+ * preceding key — handle them directly as values */
+ if (section == SECTION_LOGS) {
+ if (out->log_count < 4)
+ strncpy(out->log_paths[out->log_count++], val,
+ MAX_PATH - 1);
+ } else {
/* This is a key */
strncpy(last_key, val, sizeof(last_key) - 1);
@@ -149,6 +156,7 @@ int unit_load_file(const char *path, Unit *out) {
section = SECTION_ACTIONS;
else
in_value = 1;
+ }
} else {
/* This is a value */
in_value = 0;