|
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; |