summaryrefslogtreecommitdiff
path: root/src/core/automount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-05-02 16:01:39 +0200
committerLennart Poettering <lennart@poettering.net>2016-05-02 16:01:39 +0200
commit9703a8adb5c2ef16fcbf0e92189494a5a3438b06 (patch)
treea8d6d7af987149ccd1c78b4bb3bbd92703d77539 /src/core/automount.c
parent7b2fd9d51259f6cf350791434e640ac3519acc6c (diff)
automount: add debug message when we get notified about mount state changes
Diffstat (limited to 'src/core/automount.c')
-rw-r--r--src/core/automount.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/automount.c b/src/core/automount.c
index 464d6a70c0..d2386d04f7 100644
--- a/src/core/automount.c
+++ b/src/core/automount.c
@@ -408,7 +408,7 @@ static int autofs_send_ready(int dev_autofs_fd, int ioctl_fd, uint32_t token, in
init_autofs_dev_ioctl(&param);
param.ioctlfd = ioctl_fd;
- if (status) {
+ if (status != 0) {
param.fail.token = token;
param.fail.status = status;
} else
@@ -435,7 +435,7 @@ static int automount_send_ready(Automount *a, Set *tokens, int status) {
if (ioctl_fd < 0)
return ioctl_fd;
- if (status)
+ if (status != 0)
log_unit_debug_errno(UNIT(a), status, "Sending failure: %m");
else
log_unit_debug(UNIT(a), "Sending success.");
@@ -469,7 +469,10 @@ int automount_update_mount(Automount *a, MountState old_state, MountState state)
assert(a);
+ log_unit_debug(UNIT(a), "Got notified about mount unit state change %s → %s", mount_state_to_string(old_state), mount_state_to_string(state));
+
switch (state) {
+
case MOUNT_MOUNTED:
case MOUNT_REMOUNTING:
automount_send_ready(a, a->tokens, 0);