Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Sep 2025 14:09:24 GMT
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 6147dfa9aff7 - stable/14 - moused,syscons: Avoid warning if system has no /dev/ttyv*
Message-ID:  <202509041409.584E9Of7071596@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=6147dfa9aff7ed7e6d2529e10f83d997a079f651

commit 6147dfa9aff7ed7e6d2529e10f83d997a079f651
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-09-02 17:01:47 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-09-04 14:09:08 +0000

    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
    
    (cherry picked from commit 5eb80bf1a6a435e88507c49111a28ed9e38b4b76)
---
 libexec/rc/rc.d/moused  | 1 +
 libexec/rc/rc.d/syscons | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/libexec/rc/rc.d/moused b/libexec/rc/rc.d/moused
index 85a04c89447a..92890264193c 100755
--- a/libexec/rc/rc.d/moused
+++ b/libexec/rc/rc.d/moused
@@ -65,6 +65,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 beef467deaf8..e96fc25efc53 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202509041409.584E9Of7071596>