diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-04-24 10:13:39 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2024-04-25 13:40:41 +0200 |
commit | 19ae89869ed86c7d6e86bf439753e373c7dfef1e (patch) | |
tree | d8e8c2ae598c036d6d7f6eac8a616ae3939f0202 /src/core/mount.c | |
parent | socket: hookup handoff timestamps with processes forked off by socket units (diff) | |
download | systemd-19ae89869ed86c7d6e86bf439753e373c7dfef1e.tar.xz systemd-19ae89869ed86c7d6e86bf439753e373c7dfef1e.zip |
mount: hook up with handoff timestamps
Diffstat (limited to 'src/core/mount.c')
-rw-r--r-- | src/core/mount.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/core/mount.c b/src/core/mount.c index d70a60b377..3bf7e89e38 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -1927,6 +1927,22 @@ static void mount_shutdown(Manager *m) { m->mount_monitor = NULL; } +static void mount_handoff_timestamp( + Unit *u, + const struct ucred *ucred, + const dual_timestamp *ts) { + + Mount *m = ASSERT_PTR(MOUNT(u)); + + assert(ucred); + assert(ts); + + if (m->control_pid.pid == ucred->pid && m->control_command) { + exec_status_handoff(&m->control_command->exec_status, ucred, ts); + unit_add_to_dbus_queue(u); + } +} + static int mount_get_timeout(Unit *u, usec_t *timeout) { Mount *m = ASSERT_PTR(MOUNT(u)); usec_t t; @@ -2453,6 +2469,8 @@ const UnitVTable mount_vtable = { .reset_failed = mount_reset_failed, + .notify_handoff_timestamp = mount_handoff_timestamp, + .control_pid = mount_control_pid, .bus_set_property = bus_mount_set_property, |