summaryrefslogtreecommitdiff
path: root/src/core/load-dropin.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-15 22:25:58 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-17 00:09:16 -0400
commite8e581bf256b8c0fbd430935af79fa0e8ee570a1 (patch)
treeb203161b3797ff9df6444c0696e402448ffbda69 /src/core/load-dropin.c
parentc1b6628d64e5340d905d974bb95d673a4aae60c1 (diff)
Report about syntax errors with metadata
The information about the unit for which files are being parsed is passed all the way down. This way messages land in the journal with proper UNIT=... or USER_UNIT=... attribution. 'systemctl status' and 'journalctl -u' not displaying those messages has been a source of confusion for users, since the journal entry for a misspelt setting was often logged quite a bit earlier than the failure to start a unit. Based-on-a-patch-by: Oleksii Shevchuk <alxchk@gmail.com>
Diffstat (limited to 'src/core/load-dropin.c')
-rw-r--r--src/core/load-dropin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/load-dropin.c b/src/core/load-dropin.c
index 95c4f894cd..67774d5238 100644
--- a/src/core/load-dropin.c
+++ b/src/core/load-dropin.c
@@ -198,7 +198,9 @@ int unit_load_dropin(Unit *u) {
return 0;
STRV_FOREACH(f, u->dropin_paths) {
- r = config_parse(*f, NULL, UNIT_VTABLE(u)->sections, config_item_perf_lookup, (void*) load_fragment_gperf_lookup, false, u);
+ r = config_parse(u->id, *f, NULL,
+ UNIT_VTABLE(u)->sections, config_item_perf_lookup,
+ (void*) load_fragment_gperf_lookup, false, u);
if (r < 0)
return r;
}