From 026a3581ae29af72d387e2991ef19d7d6de42789 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Sat, 29 Nov 2008 20:12:17 +0000 Subject: busybox: bump 1.12.x / 1.13.x versions --- package/busybox/busybox-1.13.0-inotify.patch | 101 --------------------------- 1 file changed, 101 deletions(-) delete mode 100644 package/busybox/busybox-1.13.0-inotify.patch (limited to 'package/busybox/busybox-1.13.0-inotify.patch') diff --git a/package/busybox/busybox-1.13.0-inotify.patch b/package/busybox/busybox-1.13.0-inotify.patch deleted file mode 100644 index 006dea1a6..000000000 --- a/package/busybox/busybox-1.13.0-inotify.patch +++ /dev/null @@ -1,101 +0,0 @@ ---- busybox-1.13.0/miscutils/inotifyd.c Thu Oct 30 08:41:37 2008 -+++ busybox-1.13.0-inotify/miscutils/inotifyd.c Fri Nov 14 22:33:27 2008 -@@ -51,6 +51,7 @@ - int inotifyd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; - int inotifyd_main(int argc UNUSED_PARAM, char **argv) - { -+ int n; - unsigned mask = IN_ALL_EVENTS; // assume we want all events - struct pollfd pfd; - char **watched = ++argv; // watched name list -@@ -69,7 +70,6 @@ - while (*++argv) { - char *path = *argv; - char *masks = strchr(path, ':'); -- int wd; // watch descriptor - // if mask is specified -> - if (masks) { - *masks = '\0'; // split path and mask -@@ -83,32 +83,39 @@ - } - } - // add watch -- wd = inotify_add_watch(pfd.fd, path, mask); -- if (wd < 0) { -+ n = inotify_add_watch(pfd.fd, path, mask); -+ if (n < 0) - bb_perror_msg_and_die("add watch (%s) failed", path); --// } else { --// bb_error_msg("added %d [%s]:%4X", wd, path, mask); -- } -+ //bb_error_msg("added %d [%s]:%4X", n, path, mask); - } - - // setup signals -- bb_signals(0 -- + (1 << SIGHUP) -- + (1 << SIGINT) -- + (1 << SIGTERM) -- + (1 << SIGPIPE) -- , record_signo); -+ bb_signals(BB_FATAL_SIGS, record_signo); - - // do watch -- --// pfd.fd = fd; - pfd.events = POLLIN; -- -- while (!bb_got_signal && poll(&pfd, 1, -1) > 0) { -+ while (1) { - ssize_t len; - void *buf; - struct inotify_event *ie; - -+ again: -+ if (bb_got_signal) -+ break; -+ n = poll(&pfd, 1, -1); -+ /* Signal interrupted us? */ -+ if (n < 0 && errno == EINTR) -+ goto again; -+ // Under Linux, above if() is not necessary. -+ // Non-fatal signals, e.g. SIGCHLD, when set to SIG_DFL, -+ // are not interrupting poll(). -+ // Thus we can just break if n <= 0 (see below), -+ // because EINTR will happen only on SIGTERM et al. -+ // But this might be not true under other Unixes, -+ // and is generally way too subtle to depend on. -+ if (n <= 0) // strange error? -+ break; -+ - // read out all pending events - xioctl(pfd.fd, FIONREAD, &len); - #define eventbuf bb_common_bufsiz1 -@@ -117,21 +124,21 @@ - // process events. N.B. events may vary in length - while (len > 0) { - int i; -- char events[12]; -+ char events[sizeof(mask_names)]; - char *s = events; - unsigned m = ie->mask; - -- for (i = 0; i < 12; ++i, m >>= 1) { -- if (m & 1) { -+ for (i = 0; i < sizeof(mask_names)-1; ++i, m >>= 1) { -+ if (m & 1) - *s++ = mask_names[i]; -- } - } - *s = '\0'; --// bb_error_msg("exec %s %08X\t%s\t%s\t%s", agent, ie->mask, events, watched[ie->wd], ie->len ? ie->name : ""); -+ //bb_error_msg("exec %s %08X\t%s\t%s\t%s", agent, -+ // ie->mask, events, watched[ie->wd], ie->len ? ie->name : ""); - args[1] = events; - args[2] = watched[ie->wd]; - args[3] = ie->len ? ie->name : NULL; -- xspawn((char **)args); -+ wait4pid(xspawn((char **)args)); - // next event - i = sizeof(struct inotify_event) + ie->len; - len -= i; -- cgit v1.2.3