mirror of
https://github.com/troglobit/finit.git
synced 2026-10-17 10:49:34 +00:00
Use new log macros also in keventd and iwatch.c
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
a3584c6ca3
commit
34567dd244
2 files changed
+9
-9
No files matched your search
+8
-8
@@ -52,7 +52,7 @@ int iwatch_init(struct iwatch *iw)
|
||||
|
||||
iw->fd = inotify_init1(IN_NONBLOCK | IN_CLOEXEC);
|
||||
if (iw->fd < 0) {
|
||||
_pe("Failed creating inotify descriptor");
|
||||
warn("Failed creating inotify descriptor");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ int iwatch_init(struct iwatch *iw)
|
||||
len = sizeof(sz);
|
||||
if (!getsockopt(iw->fd, SOL_SOCKET, SO_RCVBUF, &sz, &len)) {
|
||||
if (setsockopt(iw->fd, SOL_SOCKET, SO_RCVBUF, &sz, sizeof(sz)))
|
||||
_pe("Failed increasing size of inotify socket");
|
||||
warn("Failed increasing size of inotify socket");
|
||||
}
|
||||
|
||||
initialized = 1;
|
||||
@@ -97,14 +97,14 @@ int iwatch_add(struct iwatch *iw, char *file, uint32_t mask)
|
||||
return -1;
|
||||
|
||||
if (!fexist(file)) {
|
||||
_d("skipping %s: no such file or directory", file);
|
||||
dbg("skipping %s: no such file or directory", file);
|
||||
return 0;
|
||||
}
|
||||
_d("adding new watcher for path %s", file);
|
||||
dbg("adding new watcher for path %s", file);
|
||||
|
||||
path = strdup(file);
|
||||
if (!path) {
|
||||
_pe("Out of memory");
|
||||
warn("Out of memory");
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ int iwatch_add(struct iwatch *iw, char *file, uint32_t mask)
|
||||
/* fallthrough */
|
||||
|
||||
default:
|
||||
_pe("Failed adding watcher for %s", path);
|
||||
warn("Failed adding watcher for %s", path);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ int iwatch_add(struct iwatch *iw, char *file, uint32_t mask)
|
||||
|
||||
iwp = malloc(sizeof(struct iwatch_path));
|
||||
if (!iwp) {
|
||||
_pe("Failed allocating new `struct iwatch_path`");
|
||||
warn("Failed allocating new `struct iwatch_path`");
|
||||
inotify_rm_watch(iw->fd, wd);
|
||||
free(path);
|
||||
return -1;
|
||||
@@ -152,7 +152,7 @@ int iwatch_del(struct iwatch *iw, struct iwatch_path *iwp)
|
||||
if (!initialized)
|
||||
return -1;
|
||||
|
||||
_d("Removing watcher for removed path %s", iwp->path);
|
||||
dbg("Removing watcher for removed path %s", iwp->path);
|
||||
|
||||
TAILQ_REMOVE(&iw->iwp_list, iwp, link);
|
||||
inotify_rm_watch(iw->fd, iwp->wd);
|
||||
|
||||
Reference in new issue
Block a user