chiark / gitweb /
core: add transient units
[elogind.git] / src / core / load-fragment.c
index 57c8156fdd4e6905fe6d60bf2583631112ed732c..2b10d72ab331893ed07e19de08290eafa6b54f8e 100644 (file)
@@ -2439,14 +2439,14 @@ static int load_from_path(Unit *u, const char *path) {
         if (null_or_empty(&st))
                 u->load_state = UNIT_MASKED;
         else {
+                u->load_state = UNIT_LOADED;
+
                 /* Now, parse the file contents */
                 r = config_parse(u->id, filename, f, UNIT_VTABLE(u)->sections,
                                  config_item_perf_lookup,
                                  (void*) load_fragment_gperf_lookup, false, true, u);
                 if (r < 0)
                         goto finish;
-
-                u->load_state = UNIT_LOADED;
         }
 
         free(u->fragment_path);