summaryrefslogtreecommitdiffstats
path: root/rules.d
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-06-10 12:59:58 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2024-06-12 01:09:26 +0200
commitdc38f9addd04c34d1fd743efc407bdebb3573d05 (patch)
tree0853ddf390c1ed5d7f8ac60d2335671d1030b3c4 /rules.d
parentudev: rewrite token_match_attr() to make it easier for Coverity to understand (diff)
downloadsystemd-dc38f9addd04c34d1fd743efc407bdebb3573d05.tar.xz
systemd-dc38f9addd04c34d1fd743efc407bdebb3573d05.zip
rules: Limit the number of device units generated for serial ttys
As per the suggestion in https://github.com/systemd/systemd/issues/33242. This reduces the number of /dev/ttySXX device units generated in mkosi from 32 to 4.
Diffstat (limited to 'rules.d')
-rw-r--r--rules.d/99-systemd.rules.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/rules.d/99-systemd.rules.in b/rules.d/99-systemd.rules.in
index ad0c7e2fb5..8ba6f177f8 100644
--- a/rules.d/99-systemd.rules.in
+++ b/rules.d/99-systemd.rules.in
@@ -10,6 +10,8 @@
ACTION=="remove", GOTO="systemd_end"
SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty[0-9]*", TAG+="systemd"
+# Exclude 8250 serial ports with a zero IO port, as they are not usable until "setserial /dev/ttySxxx port …" is invoked.
+SUBSYSTEM=="tty", KERNEL=="ttyS*", DRIVERS=="serial8250", ATTR{port}=="0x0", ENV{SYSTEMD_READY}="0"
KERNEL=="vport*", TAG+="systemd"
SUBSYSTEM=="ptp", TAG+="systemd"