mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
vt: fix git mismerge
I made a mistaking in merging the final commits for the devctl changes. This adds the 'hushed' variable and has the correct dates for the manuals. Pointy hat to: imp
This commit is contained in:
parent
cc48eb70d1
commit
80f21bb039
@ -40,7 +40,7 @@
|
|||||||
.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
.\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||||
.\" SOFTWARE.
|
.\" SOFTWARE.
|
||||||
.\"
|
.\"
|
||||||
.Dd June 23, 2021
|
.Dd November 3, 2021
|
||||||
.Dt DEVD.CONF 5
|
.Dt DEVD.CONF 5
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -605,7 +605,7 @@ Notification of a filesystem being unmounted.
|
|||||||
.Bl -column "System" "Subsystem" "1234567" -compact
|
.Bl -column "System" "Subsystem" "1234567" -compact
|
||||||
.Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description"
|
.Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description"
|
||||||
.It Li VT Ta BELL Ta RING Ta
|
.It Li VT Ta BELL Ta RING Ta
|
||||||
Notification that the console bell has run.
|
Notification that the console bell has rung.
|
||||||
See
|
See
|
||||||
.Xr vt 4
|
.Xr vt 4
|
||||||
for details.
|
for details.
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd June 4, 2020
|
.Dd November 3, 2021
|
||||||
.Dt "VT" 4
|
.Dt "VT" 4
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -301,13 +301,14 @@ keyboard layouts
|
|||||||
.Bl -column "System" "Subsystem" "1234567" -compact
|
.Bl -column "System" "Subsystem" "1234567" -compact
|
||||||
.Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description"
|
.Sy "System" Ta Sy "Subsystem" Ta Sy "Type" Ta Sy "Description"
|
||||||
.It Li VT Ta BELL Ta RING Ta
|
.It Li VT Ta BELL Ta RING Ta
|
||||||
Notification that the console bell has run.
|
Notification that the console bell has rung.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
.Bl -column "Variable" "Meaning" -compact
|
.Bl -column "Variable" "Meaning" -compact
|
||||||
.Sy "Variable" Ta Sy "Meaning"
|
.Sy "Variable" Ta Sy "Meaning"
|
||||||
.It Li duration_ms Ta Length of time the bell was requested to ring in milliseconds.
|
.It Li duration_ms Ta Length of time the bell was requested to ring in milliseconds.
|
||||||
.It Li enabled Ta true or false indicating whether or not the bell was enabled when rung.
|
.It Li enabled Ta true or false indicating whether or not the bell was administratively enabled when rung.
|
||||||
|
.It Li hushed Ta true or false indicating whether or not the bell was quieted by the user when rung.
|
||||||
.It Li hz Ta Tone that was requested in Hz.
|
.It Li hz Ta Tone that was requested in Hz.
|
||||||
.El
|
.El
|
||||||
.Pp
|
.Pp
|
||||||
|
@ -121,7 +121,7 @@ const struct terminal_class vt_termclass = {
|
|||||||
|
|
||||||
/* Bell pitch/duration. */
|
/* Bell pitch/duration. */
|
||||||
#define VT_BELLDURATION (SBT_1S / 20)
|
#define VT_BELLDURATION (SBT_1S / 20)
|
||||||
#define VT_BELLPITCH 800
|
#define VT_BELLPITCH (1193182 / 800) /* Approx 1491Hz */
|
||||||
|
|
||||||
#define VT_UNIT(vw) ((vw)->vw_device->vd_unit * VT_MAXWINDOWS + \
|
#define VT_UNIT(vw) ((vw)->vw_device->vd_unit * VT_MAXWINDOWS + \
|
||||||
(vw)->vw_number)
|
(vw)->vw_number)
|
||||||
@ -1094,7 +1094,7 @@ vt_allocate_keyboard(struct vt_device *vd)
|
|||||||
|
|
||||||
#define DEVCTL_LEN 64
|
#define DEVCTL_LEN 64
|
||||||
static void
|
static void
|
||||||
vtterm_devctl(bool enabled, int hz, sbintime_t duration)
|
vtterm_devctl(bool enabled, bool hushed, int hz, sbintime_t duration)
|
||||||
{
|
{
|
||||||
struct sbuf sb;
|
struct sbuf sb;
|
||||||
char *buf;
|
char *buf;
|
||||||
@ -1103,8 +1103,9 @@ vtterm_devctl(bool enabled, int hz, sbintime_t duration)
|
|||||||
if (buf == NULL)
|
if (buf == NULL)
|
||||||
return;
|
return;
|
||||||
sbuf_new(&sb, buf, DEVCTL_LEN, SBUF_FIXEDLEN);
|
sbuf_new(&sb, buf, DEVCTL_LEN, SBUF_FIXEDLEN);
|
||||||
sbuf_printf(&sb, "enabled=%s hz=%d duration_ms=%d",
|
sbuf_printf(&sb, "enabled=%s hushed=%s hz=%d duration_ms=%d",
|
||||||
enabled ? "true" : "false", hz, (int)(duration / SBT_1MS));
|
enabled ? "true" : "false", hushed ? "true" : "false",
|
||||||
|
hz, (int)(duration / SBT_1MS));
|
||||||
sbuf_finish(&sb);
|
sbuf_finish(&sb);
|
||||||
if (sbuf_error(&sb) == 0)
|
if (sbuf_error(&sb) == 0)
|
||||||
devctl_notify("VT", "BELL", "RING", sbuf_data(&sb));
|
devctl_notify("VT", "BELL", "RING", sbuf_data(&sb));
|
||||||
@ -1118,8 +1119,8 @@ vtterm_bell(struct terminal *tm)
|
|||||||
struct vt_window *vw = tm->tm_softc;
|
struct vt_window *vw = tm->tm_softc;
|
||||||
struct vt_device *vd = vw->vw_device;
|
struct vt_device *vd = vw->vw_device;
|
||||||
|
|
||||||
vtterm_devctl(vt_enable_bell, vw->vw_bell_pitch,
|
vtterm_devctl(vt_enable_bell, vd->vd_flags & VDF_QUIET_BELL,
|
||||||
vw->vw_bell_duration);
|
vw->vw_bell_pitch, vw->vw_bell_duration);
|
||||||
|
|
||||||
if (!vt_enable_bell)
|
if (!vt_enable_bell)
|
||||||
return;
|
return;
|
||||||
@ -1139,6 +1140,8 @@ vtterm_beep(struct terminal *tm, u_int param)
|
|||||||
{
|
{
|
||||||
u_int freq;
|
u_int freq;
|
||||||
sbintime_t period;
|
sbintime_t period;
|
||||||
|
struct vt_window *vw = tm->tm_softc;
|
||||||
|
struct vt_device *vd = vw->vw_device;
|
||||||
|
|
||||||
if ((param == 0) || ((param & 0xffff) == 0)) {
|
if ((param == 0) || ((param & 0xffff) == 0)) {
|
||||||
vtterm_bell(tm);
|
vtterm_bell(tm);
|
||||||
@ -1148,7 +1151,8 @@ vtterm_beep(struct terminal *tm, u_int param)
|
|||||||
period = ((param >> 16) & 0xffff) * SBT_1MS;
|
period = ((param >> 16) & 0xffff) * SBT_1MS;
|
||||||
freq = 1193182 / (param & 0xffff);
|
freq = 1193182 / (param & 0xffff);
|
||||||
|
|
||||||
vtterm_devctl(vt_enable_bell, freq, period);
|
vtterm_devctl(vt_enable_bell, vd->vd_flags & VDF_QUIET_BELL,
|
||||||
|
freq, period);
|
||||||
|
|
||||||
if (!vt_enable_bell)
|
if (!vt_enable_bell)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user