View | Details | Raw Unified | Return to bug 26603
Collapse All | Expand All

(-)vidcontrol.1 (+8 lines)
Lines 21-26 Link Here
21
.Nd a utility for manipulating the syscons console driver.
21
.Nd a utility for manipulating the syscons console driver.
22
.Sh SYNOPSIS
22
.Sh SYNOPSIS
23
.Nm
23
.Nm
24
.Op Fl B Cm on | off
24
.Op Fl b Ar color
25
.Op Fl b Ar color
25
.Op Fl c Ar appearance
26
.Op Fl c Ar appearance
26
.Op Fl d
27
.Op Fl d
Lines 105-110 Link Here
105
.Ar foreground 
106
.Ar foreground 
106
and 
107
and 
107
.Ar background .
108
.Ar background .
109
.It Fl B Cm on | off
110
Turn the visual bell
111
.Cm on
112
or
113
.Cm off .
114
Default is
115
.Cm off .
108
.It Fl b Ar color
116
.It Fl b Ar color
109
Set border color to 
117
Set border color to 
110
.Ar color .
118
.Ar color .
(-)vidcontrol.c (-2 / +24 lines)
Lines 67-73 Link Here
67
{
67
{
68
	fprintf(stderr, "%s\n%s\n%s\n%s\n",
68
	fprintf(stderr, "%s\n%s\n%s\n%s\n",
69
"usage: vidcontrol [-r fg bg] [-b color] [-c appearance] [-d] [-l scrmap]",
69
"usage: vidcontrol [-r fg bg] [-b color] [-c appearance] [-d] [-l scrmap]",
70
"                  [-i adapter | mode] [-L] [-M char] [-m on|off]",
70
"                  [-i adapter | mode] [-L] [-M char] [-m on|off] [-B on|off]",
71
"                  [-f size file] [-s number] [-t N|off] [-x] [-g geometry]", 
71
"                  [-f size file] [-s number] [-t N|off] [-x] [-g geometry]", 
72
"                  [mode] [fgcol [bgcol]] [show]");
72
"                  [mode] [fgcol [bgcol]] [show]");
73
	exit(1);
73
	exit(1);
Lines 419-424 Link Here
419
}
419
}
420
420
421
void
421
void
422
set_bell(char *arg)
423
{
424
	unsigned long data;
425
	int rv = 0;
426
427
	if (strcmp(arg, "on") == 0)
428
		data = 0x01;
429
	else if (strcmp(arg, "off") == 0)
430
		data = 0x02;
431
	else {
432
		warnx("argument to -B must be either on or off");
433
		return;
434
	}
435
	rv = ioctl(0, CONS_BELLTYPE, &data);
436
	if (rv)
437
		warn("ioctl(CONS_BELLTYPE)");
438
}
439
440
void
422
set_border_color(char *arg)
441
set_border_color(char *arg)
423
{
442
{
424
	int color;
443
	int color;
Lines 596-603 Link Here
596
	info.size = sizeof(info);
615
	info.size = sizeof(info);
597
	if (ioctl(0, CONS_GETINFO, &info) < 0)
616
	if (ioctl(0, CONS_GETINFO, &info) < 0)
598
		err(1, "must be on a virtual console");
617
		err(1, "must be on a virtual console");
599
	while((opt = getopt(argc, argv, "b:c:df:g:i:l:LM:m:r:s:t:x")) != -1)
618
	while((opt = getopt(argc, argv, "B:b:c:df:g:i:l:LM:m:r:s:t:x")) != -1)
600
		switch(opt) {
619
		switch(opt) {
620
			case 'B':
621
				set_bell(optarg);
622
				break;
601
			case 'b':
623
			case 'b':
602
				set_border_color(optarg);
624
				set_border_color(optarg);
603
				break;
625
				break;

Return to bug 26603