chiark / gitweb /
unit-printf: before resolving exec context specifiers check whether the object actual...
[elogind.git] / src / core / mount.c
index 5709db2266196c1a9e82ce25f35ae18bdb9a1598..92e2f734ae696b398aab1e3f4a9eb39993ce2205 100644 (file)
@@ -634,7 +634,7 @@ static int mount_load(Unit *u) {
                 if (r < 0)
                         return r;
 
-                r = unit_patch_working_directory(UNIT(m), &m->exec_context);
+                r = unit_exec_context_defaults(u, &m->exec_context);
                 if (r < 0)
                         return r;
         }
@@ -1225,7 +1225,7 @@ static void mount_sigchld_event(Unit *u, pid_t pid, int code, int status) {
 
         m->control_pid = 0;
 
-        if (is_clean_exit(code, status))
+        if (is_clean_exit(code, status, NULL))
                 f = MOUNT_SUCCESS;
         else if (code == CLD_EXITED)
                 f = MOUNT_FAILURE_EXIT_CODE;
@@ -1797,6 +1797,8 @@ DEFINE_STRING_TABLE_LOOKUP(mount_result, MountResult);
 
 const UnitVTable mount_vtable = {
         .object_size = sizeof(Mount),
+        .exec_context_offset = offsetof(Mount, exec_context),
+
         .sections =
                 "Unit\0"
                 "Mount\0"