chiark / gitweb /
systemctl: properly detect whether taling to systemd via D-Bus worked before falling...
[elogind.git] / src / automount.c
index 9843481a61c231b4783b61d0ac58238c4587974b..f81d5a2c7f41b205e7247f6c5ef1ec9dfdcbea0b 100644 (file)
@@ -37,6 +37,7 @@
 #include "dbus-automount.h"
 #include "bus-errors.h"
 #include "special.h"
+#include "label.h"
 
 static const UnitActiveState state_translation_table[_AUTOMOUNT_STATE_MAX] = {
         [AUTOMOUNT_DEAD] = UNIT_INACTIVE,
@@ -444,6 +445,8 @@ int automount_send_ready(Automount *a, int status) {
         else
                 log_debug("Sending success.");
 
+        r = 0;
+
         /* Autofs thankfully does not hand out 0 as a token */
         while ((token = PTR_TO_UINT(set_steal_first(a->tokens)))) {
                 int k;
@@ -460,8 +463,6 @@ int automount_send_ready(Automount *a, int status) {
                         r = k;
         }
 
-        r = 0;
-
 fail:
         if (ioctl_fd >= 0)
                 close_nointr_nofail(ioctl_fd);