mirror of
https://github.com/troglobit/finit.git
synced 2026-10-14 10:19:36 +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;
|
||||
|
||||
if (UEV_ERROR == events) {
|
||||
errx(1, "Unrecoverable error in devmon watcher");
|
||||
return;
|
||||
}
|
||||
|
||||
sz = read(w->fd, ev_buf, sizeof(ev_buf) - 1);
|
||||
if (sz <= 0) {
|
||||
err(1, "invalid inotify event");
|
||||
|
||||
Reference in new issue
Block a user