core: tty0 优先

This commit is contained in:
bin456789 2023-10-27 12:09:45 +08:00
parent ca348ce45b
commit 87af5d63b5
No known key found for this signature in database
GPG Key ID: EE301B386DE6C11B

View File

@ -7,7 +7,7 @@ is_in_windows() {
# 最后一个 tty 是主 tty显示的信息最全
is_first=true
for tty in tty0 ttyS0 ttyAMA0; do
for tty in ttyS0 ttyAMA0 tty0; do
# hytron 有ttyS0 但无法写入
# cygwin 没有 tty0所以 windows 下 tty0 免检
if { [ "$tty" = tty0 ] && is_in_windows; } || stty -g -F "/dev/$tty" >/dev/null 2>&1; then