Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/wscons Add missing SETBELL() for WSKBDIO_COMPLEXBELL.



details:   https://anonhg.NetBSD.org/src/rev/f30fcc91dea8
branches:  trunk
changeset: 452207:f30fcc91dea8
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Jun 22 08:03:01 2019 +0000

description:
Add missing SETBELL() for WSKBDIO_COMPLEXBELL.
wskbd_bell_data structure has value fields and operation bitmask field.
"xset b * * 0" doesn't touch period field (and doesn't initialized it)
and doesn't set DOPERIOD flag (this means that period field should not
be used).  SETBELL() handles this situation appropliately.
This happened during copying wsbell.c from wskbd.c.
Fix PR xsrc/54245.

diffstat:

 sys/dev/wscons/wsbell.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r 71e431f34869 -r f30fcc91dea8 sys/dev/wscons/wsbell.c
--- a/sys/dev/wscons/wsbell.c   Sat Jun 22 07:58:55 2019 +0000
+++ b/sys/dev/wscons/wsbell.c   Sat Jun 22 08:03:01 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsbell.c,v 1.11 2019/04/18 14:01:28 isaki Exp $ */
+/* $NetBSD: wsbell.c,v 1.12 2019/06/22 08:03:01 isaki Exp $ */
 
 /*-
  * Copyright (c) 2017 Nathanial Sloss <nathanialsloss%yahoo.com.au@localhost>
@@ -107,7 +107,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsbell.c,v 1.11 2019/04/18 14:01:28 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsbell.c,v 1.12 2019/06/22 08:03:01 isaki Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "wsmux.h"
@@ -396,9 +396,9 @@
                        return (EACCES);
                if (data == NULL)
                        return 0;
-#define d ((struct wskbd_bell_data *)data)
-               spkr_audio_play(sc, d->pitch, d->period, d->volume);
-#undef d
+               ubdp = (struct wskbd_bell_data *)data;
+               SETBELL(ubdp, ubdp, &sc->sc_bell_data);
+               spkr_audio_play(sc, ubdp->pitch, ubdp->period, ubdp->volume);
                return 0;
        }
 



Home | Main Index | Thread Index | Old Index