summaryrefslogtreecommitdiffstats
path: root/src/basic/terminal-util.c
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-08-09 17:33:39 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2024-08-10 13:01:56 +0200
commit7036dd8b27b1ccca1f76723814145f17283d2656 (patch)
tree2213386a03482f8ff979f415aef383e6340b0ae2 /src/basic/terminal-util.c
parentMerge pull request #33961 from bluca/busctl_exit (diff)
downloadsystemd-7036dd8b27b1ccca1f76723814145f17283d2656.tar.xz
systemd-7036dd8b27b1ccca1f76723814145f17283d2656.zip
terminal-util: do not query kernel cmdline for pty size
This is pointless and noisy even for debug level.
Diffstat (limited to 'src/basic/terminal-util.c')
-rw-r--r--src/basic/terminal-util.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c
index 1f5204cca5..6088320186 100644
--- a/src/basic/terminal-util.c
+++ b/src/basic/terminal-util.c
@@ -980,8 +980,11 @@ int proc_cmdline_tty_size(const char *tty, unsigned *ret_rows, unsigned *ret_col
return 0;
tty = skip_dev_prefix(tty);
+ if (path_startswith(tty, "pts/"))
+ return -EMEDIUMTYPE;
if (!in_charset(tty, ALPHANUMERICAL))
- return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "%s contains non-alphanumeric characters", tty);
+ return log_debug_errno(SYNTHETIC_ERRNO(EINVAL),
+ "TTY name '%s' contains non-alphanumeric characters, not searching kernel cmdline for size.", tty);
rowskey = strjoin("systemd.tty.rows.", tty);
if (!rowskey)