X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fpath.c;h=142fd2d8ac6bb9e73afe27d45b0a5be17db5cb2d;hb=768147d13d0877a4c3e5f6f986c3064de62ff4f1;hp=200fc2bdcb194a54877b60327a9f61079dd2acdd;hpb=8092a428d40ac682df9e80c36988043854579679;p=elogind.git diff --git a/src/path.c b/src/path.c index 200fc2bdc..142fd2d8a 100644 --- a/src/path.c +++ b/src/path.c @@ -556,19 +556,19 @@ static void path_fd_event(Unit *u, int fd, uint32_t events, Watch *w) { } 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; } @@ -686,6 +686,10 @@ DEFINE_STRING_TABLE_LOOKUP(path_type, PathType); const UnitVTable path_vtable = { .suffix = ".path", + .sections = + "Unit\0" + "Path\0" + "Install\0", .init = path_init, .done = path_done,