summaryrefslogtreecommitdiffstats
path: root/src/vmspawn/vmspawn.c
diff options
context:
space:
mode:
authorMantas Mikulėnas <grawity@gmail.com>2024-06-19 08:23:03 +0200
committerMantas Mikulėnas <grawity@gmail.com>2024-06-25 09:39:15 +0200
commit86295cb60e96b96bd971fa87708330271193094d (patch)
tree801e398c40d8be034bcdcfe9b2d2b22e2c5f6e35 /src/vmspawn/vmspawn.c
parentnspawn, vmspawn: honor the new window title switch (diff)
downloadsystemd-86295cb60e96b96bd971fa87708330271193094d.tar.xz
systemd-86295cb60e96b96bd971fa87708330271193094d.zip
run: move condition inside set_window_title()
Diffstat (limited to 'src/vmspawn/vmspawn.c')
-rw-r--r--src/vmspawn/vmspawn.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vmspawn/vmspawn.c b/src/vmspawn/vmspawn.c
index 2006545500..9dc1514ba7 100644
--- a/src/vmspawn/vmspawn.c
+++ b/src/vmspawn/vmspawn.c
@@ -1257,6 +1257,9 @@ static void set_window_title(PTYForward *f) {
assert(f);
+ if (!shall_set_terminal_title())
+ return;
+
(void) gethostname_strict(&hn);
if (emoji_enabled())
@@ -2141,8 +2144,7 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) {
} else if (!isempty(arg_background))
(void) pty_forward_set_background_color(forward, arg_background);
- if (shall_set_terminal_title())
- set_window_title(forward);
+ set_window_title(forward);
}
r = sd_event_loop(event);