]> git.ipfire.org Git - thirdparty/systemd.git/commit
getty-generator: unify add_serial_getty() and add_container_getty()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 17 Mar 2025 01:36:33 +0000 (10:36 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 18 Mar 2025 09:25:10 +0000 (18:25 +0900)
commit910dcd7049de8b0f86b382e9598adce8bcf63540
tree23b403d77620e578fea65cf09fdd3ae1f62ff073
parent0364329a03a7b345ec3d8a074edf023cf22c726d
getty-generator: unify add_serial_getty() and add_container_getty()

This also makes the generator not trigger an assertion added by
1cd3c49d09bf78a2a2e4cf25cb3d388e1f08a709. If getty.ttys.container
credential contains a line prefixed with '/dev/', then the assertion
    assert(!path_startswith(tty, "/dev/"));
was triggered. This drops the offending assertion, and such lines
are handled gracefully now.

Also, an empty string, "/dev/", and "/dev/pts/" (that is, a directory
without tty name) are gracefully skipped now.
src/getty-generator/getty-generator.c