summaryrefslogtreecommitdiff
path: root/src/core/dbus-mount.c
diff options
context:
space:
mode:
authorMichal Sekletar <msekletar@users.noreply.github.com>2017-10-16 16:15:05 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-10-16 16:15:05 +0200
commitfab35afabf01a5dea651187a1ccb5ae7cd778f9d (patch)
tree782bd51c511523c1d7e18152021fc9f62db24df0 /src/core/dbus-mount.c
parent0051ca1f63e6d9c481e3b5f989e72ff538b17daa (diff)
downloadsystemd-fab35afabf01a5dea651187a1ccb5ae7cd778f9d.tar.gz
mount: make sure we unmount tmpfs mounts before we deactivate swaps (#7076)
In the past we introduced this property just for tmp.mount. However on todays systems usually there are many more tmpfs mounts. Most notably mounts backing XDG_RUNTIME_DIR for each user. Let's generalize what we already have for tmp.mount and implement the ordering After=swap.target for all tmpfs based mounts.
Diffstat (limited to 'src/core/dbus-mount.c')
-rw-r--r--src/core/dbus-mount.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/core/dbus-mount.c b/src/core/dbus-mount.c
index 76a7a7ce97..1f9c254c39 100644
--- a/src/core/dbus-mount.c
+++ b/src/core/dbus-mount.c
@@ -88,20 +88,12 @@ static int property_get_type(
sd_bus_error *error) {
Mount *m = userdata;
- const char *d;
assert(bus);
assert(reply);
assert(m);
- if (m->from_proc_self_mountinfo && m->parameters_proc_self_mountinfo.fstype)
- d = m->parameters_proc_self_mountinfo.fstype;
- else if (m->from_fragment && m->parameters_fragment.fstype)
- d = m->parameters_fragment.fstype;
- else
- d = "";
-
- return sd_bus_message_append(reply, "s", d);
+ return sd_bus_message_append(reply, "s", mount_get_fstype(m));
}
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_result, mount_result, MountResult);