summaryrefslogtreecommitdiff
path: root/src/path.h
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2011-12-03 01:38:30 +0100
committerMichal Schmidt <mschmidt@redhat.com>2011-12-03 13:43:58 +0100
commit4b562198c79e4ebfc3d84b69a1dae374bc6cf9f5 (patch)
tree2e36d9ef9013c87e8f0dcf68cb54c8b96f87a410 /src/path.h
parent768147d13d0877a4c3e5f6f986c3064de62ff4f1 (diff)
path: refactor PathSpec usage
path_*() functions operate on "Path *p" and they do not touch PathSpec internals directly. pathspec_*() functions operate on "PathSpec *s". The PathSpec class will be useful outside of path.c.
Diffstat (limited to 'src/path.h')
-rw-r--r--src/path.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/path.h b/src/path.h
index 116fc63ff7..4e6ccf5b0e 100644
--- a/src/path.h
+++ b/src/path.h
@@ -60,6 +60,14 @@ typedef struct PathSpec {
} PathSpec;
+int pathspec_watch(PathSpec *s, Unit *u);
+void pathspec_unwatch(PathSpec *s, Unit *u);
+int pathspec_fd_event(PathSpec *s, uint32_t events);
+void pathspec_done(PathSpec *s);
+static inline bool pathspec_owns_inotify_fd(PathSpec *s, int fd) {
+ return s->inotify_fd == fd;
+}
+
struct Path {
Meta meta;