git: c3e38c0093f2 - main - vidcontrol: Disallow -i mode with vt(4)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 20 Jul 2026 22:04:31 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=c3e38c0093f2dbfafdfcc585a2f06b0313e7f6b1
commit c3e38c0093f2dbfafdfcc585a2f06b0313e7f6b1
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-03-10 21:13:31 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-07-20 22:04:16 +0000
vidcontrol: Disallow -i mode with vt(4)
vt(4) does not (currently) support changing the video mode. Report that
-i mode is not supported rather than printing an empty list.
PR: 207411
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58163
---
usr.sbin/vidcontrol/vidcontrol.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/usr.sbin/vidcontrol/vidcontrol.c b/usr.sbin/vidcontrol/vidcontrol.c
index e4cf1e8efc53..87e779eca9f2 100644
--- a/usr.sbin/vidcontrol/vidcontrol.c
+++ b/usr.sbin/vidcontrol/vidcontrol.c
@@ -182,7 +182,7 @@ usage(void)
if (vt4_mode)
fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n",
"usage: vidcontrol [-Cx] [-b color] [-c appearance] [-f [[size] file]]",
-" [-g geometry] [-h size] [-i active | adapter | mode]",
+" [-g geometry] [-h size] [-i active | adapter]",
" [-M char] [-m on | off]",
" [-r foreground background] [-S on | off] [-s number]",
" [-T xterm | cons25] [-t N | off] [mode]",
@@ -1206,7 +1206,10 @@ show_info(char *arg)
} else if (!strcmp(arg, "adapter")) {
show_adapter_info();
} else if (!strcmp(arg, "mode")) {
- show_mode_info();
+ if (vt4_mode)
+ warnx("-i mode is not supported by vt(4)");
+ else
+ show_mode_info();
} else {
revert();
errx(1, "argument to -i must be active, adapter, or mode");