terminal-util: modernize get_kernel_consoles() a bit

Also, make sure when we run in a container, we don't use the data from
/sys at all, but immediately fall back to /dev/console itself.
This commit is contained in:
Lennart Poettering
2018-02-14 14:56:17 +01:00
parent c2b3215941
commit bef41af233
2 changed files with 28 additions and 15 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ int ask_string(char **ret, const char *text, ...) _printf_(2, 3);
int vt_disallocate(const char *name);
char *resolve_dev_console(char **active);
int get_kernel_consoles(char ***consoles);
int get_kernel_consoles(char ***ret);
bool tty_is_vc(const char *tty);
bool tty_is_vc_resolve(const char *tty);
bool tty_is_console(const char *tty) _pure_;