diff --git a/src/iwatch.c b/src/iwatch.c index 2699ac13..e1ae3013 100644 --- a/src/iwatch.c +++ b/src/iwatch.c @@ -87,7 +87,7 @@ void iwatch_exit(struct iwatch *iw) initialized = 0; } -int iwatch_add(struct iwatch *iw, char *file, uint32_t mask) +int iwatch_add1(struct iwatch *iw, char *file, uint32_t mask) { struct iwatch_path *iwp; char *path; @@ -108,7 +108,7 @@ int iwatch_add(struct iwatch *iw, char *file, uint32_t mask) return -1; } - wd = inotify_add_watch(iw->fd, path, IWATCH_MASK | mask); + wd = inotify_add_watch(iw->fd, path, mask); if (wd < 0) { switch (errno) { case EEXIST: @@ -147,6 +147,11 @@ int iwatch_add(struct iwatch *iw, char *file, uint32_t mask) return 0; } +int iwatch_add(struct iwatch *iw, char *file, uint32_t mask) +{ + return iwatch_add1(iw, file, IWATCH_MASK | mask); +} + int iwatch_del(struct iwatch *iw, struct iwatch_path *iwp) { if (!initialized) diff --git a/src/iwatch.h b/src/iwatch.h index 757a0b3f..5a0e76f9 100644 --- a/src/iwatch.h +++ b/src/iwatch.h @@ -59,6 +59,7 @@ struct iwatch { int iwatch_init (struct iwatch *iw); void iwatch_exit (struct iwatch *iw); +int iwatch_add1 (struct iwatch *iw, char *file, uint32_t mask); int iwatch_add (struct iwatch *iw, char *file, uint32_t mask); int iwatch_del (struct iwatch *iw, struct iwatch_path *iwp);