Update remaining menuconfig items with approximate applet sizes
[oweals/busybox.git] / miscutils / inotifyd.c
index 1d28e8f992d576ed3f8b2f134e17d767c39d2333..2e0163e35640f2d696a57d5dbb7b08f51c8f2919 100644 (file)
@@ -12,7 +12,7 @@
  * 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]..."
@@ -162,10 +172,10 @@ int inotifyd_main(int argc, char **argv)
 
                // 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) {