mirror of
https://github.com/troglobit/finit.git
synced 2026-11-24 20:21:44 +00:00
devmon: add error checking to callback
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 file changed
+5
@@ -211,6 +211,11 @@ static void devmon_cb(uev_t *w, void *arg, int events)
|
|||||||
|
|
||||||
(void)arg;
|
(void)arg;
|
||||||
|
|
||||||
|
if (UEV_ERROR == events) {
|
||||||
|
errx(1, "Unrecoverable error in devmon watcher");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
sz = read(w->fd, ev_buf, sizeof(ev_buf) - 1);
|
sz = read(w->fd, ev_buf, sizeof(ev_buf) - 1);
|
||||||
if (sz <= 0) {
|
if (sz <= 0) {
|
||||||
err(1, "invalid inotify event");
|
err(1, "invalid inotify event");
|
||||||
|
|||||||
Reference in new issue
Block a user