]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
getty-generator: don't use "3270!tty1" when instantiating serial-getty@.service on...
authorFranck Bui <fbui@suse.com>
Wed, 12 Mar 2025 16:51:39 +0000 (17:51 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 12 Mar 2025 20:34:37 +0000 (05:34 +0900)
Path of the 3270 console in /sys is "/sys/class/tty/3270!tty1" but its device
node is "/dev/3270/tty1".

src/getty-generator/getty-generator.c

index e71b5ec101bed2fa9766e86669b6aa343ba359ab..a10f27844171920dc81b95d47298bf4cb8461192 100644 (file)
@@ -242,17 +242,17 @@ static int run(const char *dest, const char *dest_early, const char *dest_late)
                                 return r;
                 }
 
-        /* Automatically add in a serial getty on the first virtualizer console */
+        /* Automatically add a serial getty to each available virtualizer console. */
         FOREACH_STRING(j,
                        "hvc0",
                        "xvc0",
                        "hvsi0",
                        "sclp_line0",
                        "ttysclp0",
-                       "3270!tty1") {
+                       "3270/tty1") {
                 _cleanup_free_ char *p = NULL;
 
-                p = path_join("/sys/class/tty", j);
+                p = path_join("/dev", j);
                 if (!p)
                         return log_oom();
                 if (access(p, F_OK) < 0)