summaryrefslogtreecommitdiffstats
path: root/usr.sbin/kbdcontrol/kbdcontrol.c
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2006-11-16 12:27:51 +0000
committerru <ru@FreeBSD.org>2006-11-16 12:27:51 +0000
commit9e82974459c03e26ded24a5a55bf0707a93ed127 (patch)
tree0ccfc7080538194f63a057102473650c27cc2294 /usr.sbin/kbdcontrol/kbdcontrol.c
parent11bd032934459c00769d781681e7e4f71149bf1a (diff)
downloadFreeBSD-src-9e82974459c03e26ded24a5a55bf0707a93ed127.zip
FreeBSD-src-9e82974459c03e26ded24a5a55bf0707a93ed127.tar.gz
Replace magic numbers for console bell types with defines.
Diffstat (limited to 'usr.sbin/kbdcontrol/kbdcontrol.c')
-rw-r--r--usr.sbin/kbdcontrol/kbdcontrol.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/kbdcontrol/kbdcontrol.c b/usr.sbin/kbdcontrol/kbdcontrol.c
index f9fee14..c800233 100644
--- a/usr.sbin/kbdcontrol/kbdcontrol.c
+++ b/usr.sbin/kbdcontrol/kbdcontrol.c
@@ -907,11 +907,11 @@ set_bell_values(char *opt)
bell = 0;
if (!strncmp(opt, "quiet.", 6)) {
- bell = 2;
+ bell = CONS_QUIET_BELL;
opt += 6;
}
if (!strcmp(opt, "visual"))
- bell |= 1;
+ bell |= CONS_VISUAL_BELL;
else if (!strcmp(opt, "normal"))
duration = 5, pitch = 800;
else if (!strcmp(opt, "off"))
@@ -936,7 +936,7 @@ badopt:
}
ioctl(0, CONS_BELLTYPE, &bell);
- if ((bell & ~2) == 0)
+ if (!(bell & CONS_VISUAL_BELL))
fprintf(stderr, "[=%d;%dB", pitch, duration);
}
OpenPOWER on IntegriCloud