FreeBSD Bugzilla – Attachment 14137 Details for
Bug 26603
[PATCH] add option to vidcontrol(1) to enable visual bell
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.13 KB, created by
dd
on 2001-04-15 20:50:02 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
dd
Created:
2001-04-15 20:50:02 UTC
Size:
2.13 KB
patch
obsolete
>Index: vidcontrol.1 >=================================================================== >RCS file: /st/src/FreeBSD/src/usr.sbin/vidcontrol/vidcontrol.1,v >retrieving revision 1.30 >diff -u -r1.30 vidcontrol.1 >--- vidcontrol.1 2001/03/28 02:32:10 1.30 >+++ vidcontrol.1 2001/04/15 19:02:43 >@@ -21,6 +21,7 @@ > .Nd a utility for manipulating the syscons console driver. > .Sh SYNOPSIS > .Nm >+.Op Fl B Cm on | off > .Op Fl b Ar color > .Op Fl c Ar appearance > .Op Fl d >@@ -105,6 +106,13 @@ > .Ar foreground > and > .Ar background . >+.It Fl B Cm on | off >+Turn the visual bell >+.Cm on >+or >+.Cm off . >+Default is >+.Cm off . > .It Fl b Ar color > Set border color to > .Ar color . >Index: vidcontrol.c >=================================================================== >RCS file: /st/src/FreeBSD/src/usr.sbin/vidcontrol/vidcontrol.c,v >retrieving revision 1.34 >diff -u -r1.34 vidcontrol.c >--- vidcontrol.c 2001/01/25 16:53:22 1.34 >+++ vidcontrol.c 2001/04/15 19:02:43 >@@ -67,7 +67,7 @@ > { > fprintf(stderr, "%s\n%s\n%s\n%s\n", > "usage: vidcontrol [-r fg bg] [-b color] [-c appearance] [-d] [-l scrmap]", >-" [-i adapter | mode] [-L] [-M char] [-m on|off]", >+" [-i adapter | mode] [-L] [-M char] [-m on|off] [-B on|off]", > " [-f size file] [-s number] [-t N|off] [-x] [-g geometry]", > " [mode] [fgcol [bgcol]] [show]"); > exit(1); >@@ -419,6 +419,25 @@ > } > > void >+set_bell(char *arg) >+{ >+ unsigned long data; >+ int rv = 0; >+ >+ if (strcmp(arg, "on") == 0) >+ data = 0x01; >+ else if (strcmp(arg, "off") == 0) >+ data = 0x02; >+ else { >+ warnx("argument to -B must be either on or off"); >+ return; >+ } >+ rv = ioctl(0, CONS_BELLTYPE, &data); >+ if (rv) >+ warn("ioctl(CONS_BELLTYPE)"); >+} >+ >+void > set_border_color(char *arg) > { > int color; >@@ -596,8 +615,11 @@ > info.size = sizeof(info); > if (ioctl(0, CONS_GETINFO, &info) < 0) > err(1, "must be on a virtual console"); >- while((opt = getopt(argc, argv, "b:c:df:g:i:l:LM:m:r:s:t:x")) != -1) >+ while((opt = getopt(argc, argv, "B:b:c:df:g:i:l:LM:m:r:s:t:x")) != -1) > switch(opt) { >+ case 'B': >+ set_bell(optarg); >+ break; > case 'b': > set_border_color(optarg); > break;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 26603
: 14137