summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-05-03 14:08:23 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-05-03 14:08:23 -0400
commitd43bbb52de220e6008a649b128fe32da995b5e1e (patch)
tree19b6acdf82fe911dd854cee2feaee53cfc34b884 /src/core/load-fragment.c
parent6254be5def638194f21c2f47461d5acaa2a97b7f (diff)
Revert "Do not report masked units as changed (#2921)"
This reverts commit 6d10d308c6cd16528ef58fa4f5822aef936862d3. It got squashed by mistake.
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r--src/core/load-fragment.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 1a8c03904c..67867dfbe9 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -3630,12 +3630,10 @@ static int load_from_path(Unit *u, const char *path) {
if (fstat(fileno(f), &st) < 0)
return -errno;
- if (null_or_empty(&st)) {
+ if (null_or_empty(&st))
u->load_state = UNIT_MASKED;
- u->fragment_mtime = 0;
- } else {
+ else {
u->load_state = UNIT_LOADED;
- u->fragment_mtime = timespec_load(&st.st_mtim);
/* Now, parse the file contents */
r = config_parse(u->id, filename, f,
@@ -3650,6 +3648,8 @@ static int load_from_path(Unit *u, const char *path) {
u->fragment_path = filename;
filename = NULL;
+ u->fragment_mtime = timespec_load(&st.st_mtim);
+
if (u->source_path) {
if (stat(u->source_path, &st) >= 0)
u->source_mtime = timespec_load(&st.st_mtim);