mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-26 16:18:31 +00:00
Add "vidcontrol -i active", to print out active vty number,
to be used with eg "vidcontrol -s". Reviewed by: emaste@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D4968
This commit is contained in:
parent
50356f4843
commit
449d10e56e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=294321
@ -13,7 +13,7 @@
|
||||
.\" @(#)vidcontrol.1
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd December 23, 2006
|
||||
.Dd January 19, 2016
|
||||
.Dt VIDCONTROL 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -33,7 +33,7 @@
|
||||
.Oc
|
||||
.Op Fl g Ar geometry
|
||||
.Op Fl h Ar size
|
||||
.Op Fl i Cm adapter | mode
|
||||
.Op Fl i Cm active | adapter | mode
|
||||
.Op Fl l Ar screen_map
|
||||
.Op Fl M Ar char
|
||||
.Op Fl m Cm on | off
|
||||
@ -198,6 +198,8 @@ below.
|
||||
Set the size of the history (scrollback) buffer to
|
||||
.Ar size
|
||||
lines.
|
||||
.It Fl i Cm active
|
||||
Shows the active vty number.
|
||||
.It Fl i Cm adapter
|
||||
Shows info about the current video adapter.
|
||||
.It Fl i Cm mode
|
||||
@ -266,7 +268,7 @@ option.
|
||||
However, you probably should not compile the kernel debugger on a box which
|
||||
is supposed to be physically secure.
|
||||
.It Fl s Ar number
|
||||
Set the current vty to
|
||||
Set the active vty to
|
||||
.Ar number .
|
||||
.It Fl T Cm xterm | cons25
|
||||
Switch between xterm and cons25 style terminal emulation.
|
||||
|
@ -198,7 +198,7 @@ usage(void)
|
||||
if (vt4_mode)
|
||||
fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n",
|
||||
"usage: vidcontrol [-CHPpx] [-b color] [-c appearance] [-f [[size] file]]",
|
||||
" [-g geometry] [-h size] [-i adapter | mode]",
|
||||
" [-g geometry] [-h size] [-i active | adapter | mode]",
|
||||
" [-M char] [-m on | off] [-r foreground background]",
|
||||
" [-S on | off] [-s number] [-T xterm | cons25] [-t N | off]",
|
||||
" [mode] [foreground [background]] [show]");
|
||||
@ -1034,6 +1034,18 @@ static const char
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Show active VTY, ie current console number.
|
||||
*/
|
||||
|
||||
static void
|
||||
show_active_info(void)
|
||||
{
|
||||
|
||||
printf("%d\n", cur_info.active_vty);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Show graphics adapter information.
|
||||
*/
|
||||
@ -1153,13 +1165,16 @@ show_mode_info(void)
|
||||
static void
|
||||
show_info(char *arg)
|
||||
{
|
||||
if (!strcmp(arg, "adapter")) {
|
||||
|
||||
if (!strcmp(arg, "active")) {
|
||||
show_active_info();
|
||||
} else if (!strcmp(arg, "adapter")) {
|
||||
show_adapter_info();
|
||||
} else if (!strcmp(arg, "mode")) {
|
||||
show_mode_info();
|
||||
} else {
|
||||
revert();
|
||||
errx(1, "argument to -i must be either adapter or mode");
|
||||
errx(1, "argument to -i must be active, adapter, or mode");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user