projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f33cd69
)
condition: when reading /etc/ modification timestamp, let's actualy compare it as-is
author
Lennart Poettering
<lennart@poettering.net>
Thu, 14 May 2020 07:27:59 +0000
(09:27 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 18 May 2020 18:17:57 +0000
(20:17 +0200)
Previously, we'd only compare the nsec component of it, which sounds
needlessly fragile. Let's instead compare the timestamp as it is.
src/shared/condition.c
patch
|
blob
|
history
diff --git
a/src/shared/condition.c
b/src/shared/condition.c
index 4784c7db7de7cbc288e631c407aacf40e3a602a5..2d9702d87320617c335920d84d72a1ce08b6b9c9 100644
(file)
--- a/
src/shared/condition.c
+++ b/
src/shared/condition.c
@@
-614,7
+614,7
@@
static int condition_test_needs_update(Condition *c, char **env) {
return true;
}
-
timespec_store(&other.st_mtim, timestamp)
;
+
return timespec_load_nsec(&usr.st_mtim) > timestamp
;
}
return usr.st_mtim.tv_nsec > other.st_mtim.tv_nsec;