X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=filemon.c;fp=filemon.c;h=df0606b7b8b70900f41df44a9f3897bfa97aaec7;hb=fdffbf24083becad90bf829ee03b9f87dbcd9142;hp=7ba11b5f19d62a9b945913e0b9ea6e93c3b8d5f9;hpb=65ad91cb4072e297a97b06a791acd7e071e0dff6;p=innduct.git diff --git a/filemon.c b/filemon.c index 7ba11b5..df0606b 100644 --- a/filemon.c +++ b/filemon.c @@ -48,16 +48,16 @@ static void filemon_method_startfile(InputFile *ipf, Filemon_Perfile *pf) { pf->ipf= ipf; pf->wd= inotify_add_watch(filemon_inotify_fd, ipf->path, IN_MODIFY); - if (pf->wd < 0) sysdie("inotify_add_watch %s", ipf->path); + if (pf->wd < 0) sysdie("filemon inotify: inotify_add_watch %s", ipf->path); LIST_ADDHEAD(filemon_inotify_watches, pf); - dbg("filemon inotify startfile %p wd=%d pf=%p", ipf, pf->wd, pf); + dbg("filemon inotify: startfile %p wd=%d pf=%p", ipf, pf->wd, pf); } static void filemon_method_stopfile(InputFile *ipf, Filemon_Perfile *pf) { - dbg("filemon inotify stopfile %p wd=%d pf=%p", ipf, pf->wd, pf); + dbg("filemon inotify: stopfile %p wd=%d pf=%p", ipf, pf->wd, pf); int r= inotify_rm_watch(filemon_inotify_fd, pf->wd); - if (r) syscrash("inotify_rm_watch"); + if (r) syscrash("filemon inotify: inotify_rm_watch"); LIST_REMOVE(filemon_inotify_watches, pf); } @@ -69,9 +69,10 @@ static void *filemon_inotify_readable(oop_source *lp, int fd, int r= read(filemon_inotify_fd, &iev, sizeof(iev)); if (r==-1) { if (isewouldblock(errno)) break; - syscrash("read from inotify master"); + syscrash("filemon inotify: read from inotify master"); } else if (r!=sizeof(iev)) { - crash("inotify read %d bytes wanted struct of %d", r, (int)sizeof(iev)); + crash("filemon inotify: read %d bytes when wanted struct of %d", + r, (int)sizeof(iev)); } Filemon_Perfile *pf; FOR_LIST_NODE(pf, filemon_inotify_watches)