aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2025-09-02 17:01:47 +0000
committerEd Maste <emaste@FreeBSD.org>2025-09-02 17:28:04 +0000
commit5eb80bf1a6a435e88507c49111a28ed9e38b4b76 (patch)
tree52dfae9829a8687e873526bf6872933baa8ea916
parentdd747d7bcb808eb18385a527163054c874aa3c27 (diff)
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
-rwxr-xr-xlibexec/rc/rc.d/moused1
-rwxr-xr-xlibexec/rc/rc.d/syscons2
2 files changed, 3 insertions, 0 deletions
diff --git a/libexec/rc/rc.d/moused b/libexec/rc/rc.d/moused
index 6f1b95af0f0a..aaf0dd0890a8 100755
--- a/libexec/rc/rc.d/moused
+++ b/libexec/rc/rc.d/moused
@@ -70,6 +70,7 @@ moused_start()
esac
for ttyv in /dev/ttyv* ; do
+ [ "$ttyv" = '/dev/ttyv*' ] && break
vidcontrol < ${ttyv} ${mousechar_arg} -m on
done
}
diff --git a/libexec/rc/rc.d/syscons b/libexec/rc/rc.d/syscons
index 325628a83d8c..b01b648ace6e 100755
--- a/libexec/rc/rc.d/syscons
+++ b/libexec/rc/rc.d/syscons
@@ -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