]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/automount.c
core: rename unit_{start_limit|condition|assert}_test() to unit_test_xyz()
[thirdparty/systemd.git] / src / core / automount.c
index 6db13ab08fa8becb9b81b1009c4f61c1da925281..eff357bb3deac72e14a71737fd297c07d2878e32 100644 (file)
@@ -578,10 +578,13 @@ static void automount_enter_waiting(Automount *a) {
                 goto fail;
         }
 
-        if (pipe2(p, O_NONBLOCK|O_CLOEXEC) < 0) {
+        if (pipe2(p, O_CLOEXEC) < 0) {
                 r = -errno;
                 goto fail;
         }
+        r = fd_nonblock(p[0], true);
+        if (r < 0)
+                goto fail;
 
         xsprintf(options, "fd=%i,pgrp="PID_FMT",minproto=5,maxproto=5,direct", p[1], getpgrp());
         xsprintf(name, "systemd-"PID_FMT, getpid_cached());
@@ -810,7 +813,7 @@ static int automount_start(Unit *u) {
                 return -ENOENT;
         }
 
-        r = unit_start_limit_test(u);
+        r = unit_test_start_limit(u);
         if (r < 0) {
                 automount_enter_dead(a, AUTOMOUNT_FAILURE_START_LIMIT_HIT);
                 return r;