chiark / gitweb /
core: fixate show_status earlier, so that we actually print the welcome message
[elogind.git] / src / getty-generator / getty-generator.c
index 36a93695fbd449e7ab63cd61604d5a1218cfaaec..f352a29f99ede35eaefe26a9953efc1caf0411a5 100644 (file)
@@ -97,7 +97,9 @@ int main(int argc, char *argv[]) {
         static const char virtualization_consoles[] =
                 "hvc0\0"
                 "xvc0\0"
-                "hvsi0\0";
+                "hvsi0\0"
+                "sclp_line0\0"
+                "ttysclp0\0";
 
         _cleanup_free_ char *active = NULL;
         const char *j;
@@ -130,7 +132,7 @@ int main(int argc, char *argv[]) {
                  * the variable name we only support ptys here. */
 
                 r = getenv_for_pid(1, "container_ttys", &container_ttys);
-                if (r >= 0) {
+                if (r > 0) {
                         char *w, *state;
                         size_t l;
 
@@ -147,7 +149,7 @@ int main(int argc, char *argv[]) {
                                         t = tty;
 
                                 /* Then, make sure it's actually a pty */
-                                t = path_startswith(tty, "pts/");
+                                t = path_startswith(t, "pts/");
                                 if (!t)
                                         continue;