summaryrefslogtreecommitdiff
path: root/src/core/automount.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-11-28 13:54:40 +0100
committerMichal Schmidt <mschmidt@redhat.com>2014-11-28 13:54:40 +0100
commitc95f97a20f3b854109dc564da64950067b388aeb (patch)
tree2c070c74312ef5418e5b752d68cbc67a6963119a /src/core/automount.c
parent31938a8560a664c32a9d72f1fc2d4347b232e6e9 (diff)
core: two more log_unit_*_errno() conversions
Diffstat (limited to 'src/core/automount.c')
-rw-r--r--src/core/automount.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/automount.c b/src/core/automount.c
index 3f34a2895f..bc2834334e 100644
--- a/src/core/automount.c
+++ b/src/core/automount.c
@@ -744,7 +744,10 @@ static int automount_dispatch_io(sd_event_source *s, int fd, uint32_t events, vo
l = loop_read(a->pipe_fd, &packet, sizeof(packet), true);
if (l != sizeof(packet)) {
- log_unit_error(UNIT(a)->id, "Invalid read from pipe: %s", l < 0 ? strerror(-l) : "short read");
+ if (l < 0)
+ log_unit_error_errno(UNIT(a)->id, l, "Invalid read from pipe: %m");
+ else
+ log_unit_error(UNIT(a)->id, "Invalid read from pipe: short read");
goto fail;
}