aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miscutils/inotifyd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/miscutils/inotifyd.c b/miscutils/inotifyd.c
index fdf2a2c2b..d6b5d246b 100644
--- a/miscutils/inotifyd.c
+++ b/miscutils/inotifyd.c
@@ -53,9 +53,6 @@ enum {
53 MASK_BITS = sizeof(mask_names) - 1 53 MASK_BITS = sizeof(mask_names) - 1
54}; 54};
55 55
56extern int inotify_init(void);
57extern int inotify_add_watch(int fd, const char *path, uint32_t mask);
58
59int inotifyd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 56int inotifyd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
60int inotifyd_main(int argc, char **argv) 57int inotifyd_main(int argc, char **argv)
61{ 58{
@@ -160,9 +157,11 @@ int inotifyd_main(int argc, char **argv)
160 args[3] = ie->len ? ie->name : NULL; 157 args[3] = ie->len ? ie->name : NULL;
161 wait4pid(xspawn((char **)args)); 158 wait4pid(xspawn((char **)args));
162 // we are done if all files got final x event 159 // we are done if all files got final x event
163 if (ie->mask & 0x8000) 160 if (ie->mask & 0x8000) {
164 if (--argc <= 0) 161 if (--argc <= 0)
165 goto done; 162 goto done;
163 inotify_rm_watch(pfd.fd, ie->wd);
164 }
166 } 165 }
167 // next event 166 // next event
168 i = sizeof(struct inotify_event) + ie->len; 167 i = sizeof(struct inotify_event) + ie->len;