wendy

inotify based node watcher
git clone git://git.2f30.org/wendy
Log | Files | Refs | README | LICENSE

commit e98930f741f75b078057ea54e5a252f85b10dc98
parent 166c7267261051b9944fb21f8f8afdbdc5df0796
Author: Willy Goiffon <dev@z3bra.org>
Date:   Fri, 28 Feb 2020 20:20:27 +0100

Change default mask to events about filesystem change

This would only report events about create, delete, move and modify.

Diffstat:
Mwendy.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/wendy.c b/wendy.c @@ -12,6 +12,7 @@ #include "strlcpy.h" #define EVSZ (sizeof(struct inotify_event) + NAME_MAX + 1) +#define MASK (IN_CREATE|IN_DELETE|IN_MODIFY|IN_MOVE|IN_CLOSE_WRITE) struct watcher { int wd; @@ -104,7 +105,7 @@ main (int argc, char **argv) { int fd, rflag = 0; uint8_t buf[EVSZ]; - uint32_t mask = IN_ALL_EVENTS; + uint32_t mask = MASK; ssize_t len, off = 0; char path[PATH_MAX]; char *argv0 = NULL;