Bug 289173 - mouse(8): Probes non-existing /dev/ttyv* in bhyve
Summary: mouse(8): Probes non-existing /dev/ttyv* in bhyve
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 15.0-CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Ed Maste
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-29 22:04 UTC by Michael Osipov
Modified: 2025-09-04 14:33 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov freebsd_committer freebsd_triage 2025-08-29 22:04:15 UTC
Running FreeBSD 15 from 2025-08-28 ISO in bhyve on 13.5-STABLE via UEFI boot. I have enabled moused, likely pointless in the VM, but I see the following startup message:
Starting default moused.
eval: cannot open /dev/ttyv*: No such file or directory

It comes from moused script:
        for ttyv in /dev/ttyv* ; do
                vidcontrol < ${ttyv} ${mousechar_arg} -m on
        done

I don't know much about moused, but either it should not start in VMs or one must check before the foor loop wether ttyv* exist...
Comment 1 Ed Maste freebsd_committer freebsd_triage 2025-09-02 17:06:59 UTC
Proposed fix in https://reviews.freebsd.org/D52344
Comment 2 commit-hook freebsd_committer freebsd_triage 2025-09-02 17:28:25 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=5eb80bf1a6a435e88507c49111a28ed9e38b4b76

commit 5eb80bf1a6a435e88507c49111a28ed9e38b4b76
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2025-09-02 17:01:47 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-09-02 17:28:04 +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

 libexec/rc/rc.d/moused  | 1 +
 libexec/rc/rc.d/syscons | 2 ++
 2 files changed, 3 insertions(+)
Comment 3 commit-hook freebsd_committer freebsd_triage 2025-09-04 14:10:05 UTC
A commit in branch stable/14 references this bug:

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(+)
Comment 4 Michael Osipov freebsd_committer freebsd_triage 2025-09-04 14:33:40 UTC
Thank you Ed for the quick fix!