X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fautomount.c;h=d5da497c8e2a0ff832a38857adaf55f867fee901;hp=57d1065049880e1723fb0a580ddae024e94e8835;hb=8630d370239482b6e4913e81011440b173e41b79;hpb=75d287d3aef51baac189395d0ca6e2271ba4d604 diff --git a/src/automount.c b/src/automount.c index 57d106504..d5da497c8 100644 --- a/src/automount.c +++ b/src/automount.c @@ -1,4 +1,4 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ /*** This file is part of systemd. @@ -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, @@ -156,7 +157,7 @@ static int automount_add_default_dependencies(Automount *a) { if ((r = unit_add_dependency_by_name(UNIT(a), UNIT_AFTER, SPECIAL_FSCK_TARGET, NULL, true)) < 0) return r; - if ((r = unit_add_two_dependencies_by_name(UNIT(a), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0) + if ((r = unit_add_two_dependencies_by_name(UNIT(a), UNIT_BEFORE, UNIT_CONFLICTED_BY, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0) return r; } @@ -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);