chiark / gitweb /
journal: set the _SYSTEMD_UNIT field for messages from terminated processes
[elogind.git] / src / core / mount.c
index e8f8856414b615571acbd83fa4f5ad9e830181c2..3f8cf8a68f004cb6b6bedac954c804ee2509f5f9 100644 (file)
@@ -770,6 +770,7 @@ static int mount_spawn(Mount *m, ExecCommand *c, pid_t *_pid) {
                             UNIT(m)->cgroup_bondings,
                             UNIT(m)->cgroup_attributes,
                             NULL,
+                            UNIT(m)->id,
                             NULL,
                             &pid)) < 0)
                 goto fail;
@@ -915,12 +916,12 @@ static void mount_enter_mounting(Mount *m) {
         m->control_command_id = MOUNT_EXEC_MOUNT;
         m->control_command = m->exec_command + MOUNT_EXEC_MOUNT;
 
-        mkdir_p(m->where, m->directory_mode);
+        mkdir_p_label(m->where, m->directory_mode);
 
         /* Create the source directory for bind-mounts if needed */
         p = get_mount_parameters_fragment(m);
         if (p && mount_is_bind(p))
-                mkdir_p(p->what, m->directory_mode);
+                mkdir_p_label(p->what, m->directory_mode);
 
         if (m->from_fragment)
                 r = exec_command_set(
@@ -1451,27 +1452,6 @@ fail:
         return r;
 }
 
-static int mount_find_pri(char *options) {
-        char *end, *pri;
-        unsigned long r;
-
-        if (!(pri = mount_test_option(options, "pri")))
-                return 0;
-
-        pri += 4;
-
-        errno = 0;
-        r = strtoul(pri, &end, 10);
-
-        if (errno != 0)
-                return -errno;
-
-        if (end == pri || (*end != ',' && *end != 0))
-                return -EINVAL;
-
-        return (int) r;
-}
-
 static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) {
         int r = 0;
         unsigned i;