git: f65c19a242de - main - kbdcontrol: correct bell frequency for vt(4)

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Fri, 01 Nov 2024 15:55:30 UTC
The branch main has been updated by emaste:

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

commit f65c19a242de322930f6a1cd7d5e6bf3ce19ce42
Author:     Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-09-26 23:55:33 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-11-01 15:54:40 +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
---
 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 4e27febe2164..349dcfcaff8a 100644
--- a/usr.sbin/kbdcontrol/kbdcontrol.c
+++ b/usr.sbin/kbdcontrol/kbdcontrol.c
@@ -1038,8 +1038,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 */
 	}