}
if (ioctl(fd, FIONREAD, &l) < 0) {
- log_error("FIONREAD failed: %s", strerror(errno));
+ log_error("FIONREAD failed: %m");
goto fail;
}
assert(l > 0);
if (!(buf = malloc(l))) {
- log_error("Failed to allocate buffer: %s", strerror(-ENOMEM));
+ log_error("Failed to allocate buffer: %s", strerror(ENOMEM));
goto fail;
}
if ((k = read(fd, buf, l)) < 0) {
- log_error("Failed to read inotify event: %s", strerror(-errno));
+ log_error("Failed to read inotify event: %m");
goto fail;
}
const UnitVTable path_vtable = {
.suffix = ".path",
+ .sections =
+ "Unit\0"
+ "Path\0"
+ "Install\0",
.init = path_init,
.done = path_done,