moused,syscons: Avoid warning if system has no /dev/ttyv*

A VM had no virtual terminals and emitted a warning on boot
`eval: cannot open /dev/ttyv*: No such file or directory`.

Break the loop in this case to avoid the warning.

PR:		289173
Reviewed by:	jlduran
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52344
This commit is contained in:
Ed Maste
2025-09-02 13:01:47 -04:00
parent dd747d7bcb
commit 5eb80bf1a6
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -70,6 +70,7 @@ moused_start()
esac
for ttyv in /dev/ttyv* ; do
[ "$ttyv" = '/dev/ttyv*' ] && break
vidcontrol < ${ttyv} ${mousechar_arg} -m on
done
}
+2
View File
@@ -238,6 +238,7 @@ syscons_configure_keyboard()
sc_init
echo -n ' allscreens_kbd'
for ttyv in /dev/ttyv*; do
[ "$ttyv" = '/dev/ttyv*' ] && break
kbdcontrol ${allscreens_kbdflags} < ${ttyv} > ${ttyv} 2>&1
done
fi
@@ -382,6 +383,7 @@ syscons_start()
sc_init
echo -n ' allscreens'
for ttyv in /dev/ttyv*; do
[ "$ttyv" = '/dev/ttyv*' ] && break
vidcontrol ${allscreens_flags} < ${ttyv} > ${ttyv} 2>&1
done
fi