diff options
Diffstat (limited to 'src/fs_event')
| -rw-r--r-- | src/fs_event/fs_event_inotify.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fs_event/fs_event_inotify.c b/src/fs_event/fs_event_inotify.c index c0862c7..a70550a 100644 --- a/src/fs_event/fs_event_inotify.c +++ b/src/fs_event/fs_event_inotify.c @@ -1,3 +1,4 @@ +#define AL_LOG_SECTION "fs_event" #include <al/log.h> #include "../util/error.h" @@ -10,7 +11,6 @@ static void event_callback(struct ev_loop *loop, ev_io *w, s32 revents) (void)loop; struct nn_fs_event *fs = (struct nn_fs_event *)w->data; (void)revents; - struct inotify_event event = { 0 }; ssize_t ret = nn_read(fs->fd, &event, sizeof(struct inotify_event)); if (ret == sizeof(struct inotify_event)) { @@ -29,7 +29,7 @@ void nn_fs_event_init(struct nn_fs_event *fs, str *path, u32 mask, fs->callback = callback; fs->userdata = userdata; fs->event.data = fs; - ev_io_init(&fs->event, event_callback, fs->fd, EV_READ); + ev_io_init_n(&fs->event, event_callback, fs->fd, EV_READ); } bool nn_fs_event_start(struct nn_fs_event *fs, struct nn_event_loop *loop) @@ -37,7 +37,7 @@ bool nn_fs_event_start(struct nn_fs_event *fs, struct nn_event_loop *loop) fs->loop = loop; fs->wd = inotify_add_watch(fs->fd, fs->path, fs->mask); if (fs->wd == -1) { - al_log_error("fs_event", "inotify_add_watch(%s) failed (%s)", fs->path, nn_strerror(errno)); + error("inotify_add_watch(%s) failed (%s).", fs->path, nn_strerror(errno)); return false; } ev_io_start(fs->loop->ev, &fs->event); |