* Use as follows:
* # inotifyd /user/space/agent dir/or/file/being/watched[:mask] ...
*
- * When a filesystem event matching the specified mask is occured on specified file (or directory)
+ * When a filesystem event matching the specified mask is occurred on specified file (or directory)
* a userspace agent is spawned and given the following parameters:
* $1. actual event(s)
* $2. file (or directory) name
*
* See below for mask names explanation.
*/
+//config:config INOTIFYD
+//config: bool "inotifyd (3.5 kb)"
+//config: default n # doesn't build on Knoppix 5
+//config: help
+//config: Simple inotify daemon. Reports filesystem changes. Requires
+//config: kernel >= 2.6.13
+
+//applet:IF_INOTIFYD(APPLET(inotifyd, BB_DIR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_INOTIFYD) += inotifyd.o
//usage:#define inotifyd_trivial_usage
//usage: "PROG FILE1[:MASK]..."
// read out all pending events
// (NB: len must be int, not ssize_t or long!)
+#define eventbuf bb_common_bufsiz1
+ setup_common_bufsiz();
xioctl(pfd.fd, FIONREAD, &len);
-#define eventbuf bb_common_bufsiz1
-#define sizeof_eventbuf COMMON_BUFSIZE
- ie = buf = (len <= sizeof_eventbuf) ? eventbuf : xmalloc(len);
+ ie = buf = (len <= COMMON_BUFSIZE) ? eventbuf : xmalloc(len);
len = full_read(pfd.fd, buf, len);
// process events. N.B. events may vary in length
while (len > 0) {