login: assing /dev/console logins to seat0
This commit is contained in:
@@ -4287,6 +4287,15 @@ bool tty_is_vc(const char *tty) {
|
||||
return vtnr_from_tty(tty) >= 0;
|
||||
}
|
||||
|
||||
bool tty_is_console(const char *tty) {
|
||||
assert(tty);
|
||||
|
||||
if (startswith(tty, "/dev/"))
|
||||
tty += 5;
|
||||
|
||||
return streq(tty, "console");
|
||||
}
|
||||
|
||||
int vtnr_from_tty(const char *tty) {
|
||||
int i, r;
|
||||
|
||||
|
||||
@@ -415,6 +415,7 @@ char *fstab_node_to_udev_node(const char *p);
|
||||
|
||||
bool tty_is_vc(const char *tty);
|
||||
bool tty_is_vc_resolve(const char *tty);
|
||||
bool tty_is_console(const char *tty);
|
||||
int vtnr_from_tty(const char *tty);
|
||||
const char *default_term_for_tty(const char *tty);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user