chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
path: use %m instead of strerror(errno)
[elogind.git]
/
src
/
path.c
diff --git
a/src/path.c
b/src/path.c
index 200fc2bdcb194a54877b60327a9f61079dd2acdd..142fd2d8ac6bb9e73afe27d45b0a5be17db5cb2d 100644
(file)
--- 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) {
}
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))) {
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) {
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;
}
goto fail;
}
@@
-686,6
+686,10
@@
DEFINE_STRING_TABLE_LOOKUP(path_type, PathType);
const UnitVTable path_vtable = {
.suffix = ".path",
const UnitVTable path_vtable = {
.suffix = ".path",
+ .sections =
+ "Unit\0"
+ "Path\0"
+ "Install\0",
.init = path_init,
.done = path_done,
.init = path_init,
.done = path_done,