diff options
author | Lennart Poettering <lennart@poettering.net> | 2024-04-24 11:10:50 +0200 |
---|---|---|
committer | Luca Boccassi <luca.boccassi@gmail.com> | 2024-04-24 21:23:42 +0200 |
commit | b9e4d9ba958525c910244a12f01d76dbf3760af9 (patch) | |
tree | c5c38ffb09063a8efe0b4c1d20962ac1b770d107 /src/core/mount.c | |
parent | Merge pull request #32465 from CodethinkLabs/mkosi-debug (diff) | |
download | systemd-b9e4d9ba958525c910244a12f01d76dbf3760af9.tar.xz systemd-b9e4d9ba958525c910244a12f01d76dbf3760af9.zip |
mount,swap: include ExecStatus output in dump
socket and service units output there ExecCommand/ExecStatus definitions
already, but this was missing in mount/swap. Fix that.
Diffstat (limited to 'src/core/mount.c')
-rw-r--r-- | src/core/mount.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/mount.c b/src/core/mount.c index 886ef8974c..d70a60b377 100644 --- a/src/core/mount.c +++ b/src/core/mount.c @@ -810,9 +810,13 @@ static void mount_catchup(Unit *u) { static void mount_dump(Unit *u, FILE *f, const char *prefix) { Mount *m = ASSERT_PTR(MOUNT(u)); MountParameters *p; + const char *prefix2; assert(f); + prefix = strempty(prefix); + prefix2 = strjoina(prefix, "\t"); + p = get_mount_parameters(m); fprintf(f, @@ -857,6 +861,16 @@ static void mount_dump(Unit *u, FILE *f, const char *prefix) { exec_context_dump(&m->exec_context, f, prefix); kill_context_dump(&m->kill_context, f, prefix); cgroup_context_dump(UNIT(m), f, prefix); + + for (MountExecCommand c = 0; c < _MOUNT_EXEC_COMMAND_MAX; c++) { + if (!m->exec_command[c].argv) + continue; + + fprintf(f, "%s%s %s:\n", + prefix, special_glyph(SPECIAL_GLYPH_ARROW_RIGHT), mount_exec_command_to_string(c)); + + exec_command_dump(m->exec_command + c, f, prefix2); + } } static int mount_spawn(Mount *m, ExecCommand *c, PidRef *ret_pid) { |