git: 761088364c96 - stable/13 - kbdcontrol: correct bell frequency for vt(4)

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Sun, 03 Nov 2024 17:45:11 UTC
The branch stable/13 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=761088364c96ba9af8e6417336c677f98f90b2b1

commit 761088364c96ba9af8e6417336c677f98f90b2b1
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-09-26 23:55:33 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-11-03 17:44:49 +0000

    kbdcontrol: correct bell frequency for vt(4)
    
    Do the `1193182 / pitch` hack only for sc(4).
    
    PR:             281713
    Reported by:    Rudolf Polzer
    Reviewed by:    imp
    Sponsored by:   The FreeBSD Foundation
    Differential Revision: https://reviews.freebsd.org/D46803
    
    (cherry picked from commit f65c19a242de322930f6a1cd7d5e6bf3ce19ce42)
    (cherry picked from commit 2234362780854c426395a35403ed3dce42ccacc9)
---
 usr.sbin/kbdcontrol/kbdcontrol.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/usr.sbin/kbdcontrol/kbdcontrol.c b/usr.sbin/kbdcontrol/kbdcontrol.c
index b08705481a5d..2d2110ef5c9c 100644
--- a/usr.sbin/kbdcontrol/kbdcontrol.c
+++ b/usr.sbin/kbdcontrol/kbdcontrol.c
@@ -1037,8 +1037,10 @@ badopt:
 			warnx("argument to -b must be duration.pitch or [quiet.]visual|normal|off");
 			return;
 		}
-		if (pitch != 0)
-			pitch = 1193182 / pitch;	/* in Hz */
+		if (!is_vt4()) {
+			if (pitch != 0)
+				pitch = 1193182 / pitch;	/* in Hz */
+		}
 		duration /= 10;	/* in 10 m sec */
 	}