Skip to content

Commit dc38f9a

Browse files
daandemeyerbluca
authored andcommitted
rules: Limit the number of device units generated for serial ttys
As per the suggestion in systemd#33242. This reduces the number of /dev/ttySXX device units generated in mkosi from 32 to 4.
1 parent 442c6bd commit dc38f9a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

rules.d/99-systemd.rules.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
ACTION=="remove", GOTO="systemd_end"
1111

1212
SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty[0-9]*", TAG+="systemd"
13+
# Exclude 8250 serial ports with a zero IO port, as they are not usable until "setserial /dev/ttySxxx port …" is invoked.
14+
SUBSYSTEM=="tty", KERNEL=="ttyS*", DRIVERS=="serial8250", ATTR{port}=="0x0", ENV{SYSTEMD_READY}="0"
1315
KERNEL=="vport*", TAG+="systemd"
1416

1517
SUBSYSTEM=="ptp", TAG+="systemd"

0 commit comments

Comments
 (0)