[systemd-commits] src/load-fragment-gperf.gperf.m4 src/path.c

Michal Schmidt michich at kemper.freedesktop.org
Thu Dec 8 10:10:24 PST 2011


 src/load-fragment-gperf.gperf.m4 |    1 +
 src/path.c                       |    6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 714d943f72417f53bcb98ed45d002aa270e793c4
Author: Michal Schmidt <mschmidt at redhat.com>
Date:   Thu Dec 8 12:09:10 2011 +0100

    path: add missing pieces for PathModified
    
    PATH_MODIFIED worked internally for PID files detection, but was unusable
    in units.

diff --git a/src/load-fragment-gperf.gperf.m4 b/src/load-fragment-gperf.gperf.m4
index 84ae28c..35ec005 100644
--- a/src/load-fragment-gperf.gperf.m4
+++ b/src/load-fragment-gperf.gperf.m4
@@ -210,6 +210,7 @@ m4_dnl
 Path.PathExists,                 config_parse_path_spec,             0,                             0
 Path.PathExistsGlob,             config_parse_path_spec,             0,                             0
 Path.PathChanged,                config_parse_path_spec,             0,                             0
+Path.PathModified,               config_parse_path_spec,             0,                             0
 Path.DirectoryNotEmpty,          config_parse_path_spec,             0,                             0
 Path.Unit,                       config_parse_path_unit,             0,                             0
 Path.MakeDirectory,              config_parse_bool,                  0,                             offsetof(Path, make_directory)
diff --git a/src/path.c b/src/path.c
index 1e5d825..3fee247 100644
--- a/src/path.c
+++ b/src/path.c
@@ -149,7 +149,8 @@ int pathspec_fd_event(PathSpec *s, uint32_t events) {
         while (k > 0) {
                 size_t step;
 
-                if (s->type == PATH_CHANGED && s->primary_wd == e->wd)
+                if ((s->type == PATH_CHANGED || s->type == PATH_MODIFIED) &&
+                    s->primary_wd == e->wd)
                         r = 1;
 
                 step = sizeof(struct inotify_event) + e->len;
@@ -184,7 +185,8 @@ static bool pathspec_check_good(PathSpec *s, bool initial) {
                 break;
         }
 
-        case PATH_CHANGED: {
+        case PATH_CHANGED:
+        case PATH_MODIFIED: {
                 bool b;
 
                 b = access(s->path, F_OK) >= 0;



More information about the systemd-commits mailing list