git: vidcontrol: accept the documented [mode] [fg [bg]] [show] forms
Aaron LI
aly at crater.dragonflybsd.org
Mon Nov 2 07:58:37 PST 2026
commit 6263e8bea9e287af3ddd29287e65e08a6a5e2b64
Author: David Bidner <david at crap.solutions>
Date: Mon Nov 2 14:49:33 2026 +0100
vidcontrol: accept the documented [mode] [fg [bg]] [show] forms
Fixes the syntax documented in vidcontrol(1).
video_mode() treated any unrecognized first positional argument as an
invalid video mode, so the documented color-only form
vidcontrol yellow blue
failed with "invalid video mode name". Leave such an argument to
get_normal_colors() instead, as FreeBSD does (see FreeBSD commit
1b8c842e: "Fix some parsing and error handling bugs"). A mistyped mode
name then reaches usage() with exit status 1, and MODE_<non-digit> still
reports "invalid video mode number".
The "show" handling also sat before the mode and color arguments, so it was
only accepted as the *first* positional argument and the documented
vidcontrol 80x25 white black show
ended in usage(). Fix it by moving it after them.
The documented forms behave as before otherwise. The undocumented
"vidcontrol show 80x25" is no longer accepted: it prints the frame and then
ends in usage(), as it does on FreeBSD.
Bug: https://bugs.dragonflybsd.org/issues/2493
Summary of changes:
usr.sbin/vidcontrol/vidcontrol.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6263e8bea9e287af3ddd29287e65e08a6a5e2b64
--
DragonFly BSD source repository
More information about the Commits
mailing list