From nobody Wed Apr 20 03:30:14 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 8D2E411E1940; Wed, 20 Apr 2022 03:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KjmQG3WZhz4jBx; Wed, 20 Apr 2022 03:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650425414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1haYQ45+GbQWJeuTkZZltPWRzOHq13gVfQ9PelOzXTg=; b=PmHsh5/jHQG3U+jCUQZsvzWb2EA6tYBYBNB+c3H06s0eexjASKArWkF+JD9cIjsycPiX4a +rKnO7VwjAO4p5SjY5rr/8mvt9iT1r0doJldSzYbG1utgsyfn5FNr1TU8CtteY948cr80N hxzr7mgOoyVh04pOcRnPY8/RgtBwBWyxULFH8tCpOx9jhOXPw0tE2GJtp5QerE/6nijRu8 ldh3jY5pUwbnC/VPDyufHociiBBZ3Z67H5Gxp/8WnqU66EazJTZPiwoA2FGjMSnNH8tTJT CvWMwmlYPX8YkZDq2MZNgavvAhlNZDZHNBD1XcTN9fgNDY9vFofgVX13Qt/N3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 59F8B42E6; Wed, 20 Apr 2022 03:30:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23K3UEfk026220; Wed, 20 Apr 2022 03:30:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23K3UE7p026216; Wed, 20 Apr 2022 03:30:14 GMT (envelope-from git) Date: Wed, 20 Apr 2022 03:30:14 GMT Message-Id: <202204200330.23K3UE7p026216@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 1bb77846adee - stable/12 - vidcontrol: disable p, P, and H when vt(4) is in use List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 1bb77846adee4a44c38a7b5777749357b1b9ff20 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650425414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1haYQ45+GbQWJeuTkZZltPWRzOHq13gVfQ9PelOzXTg=; b=btlyASHUmGCkreizPmBbCp+kVoZPXOROaQ1F3Fd2J9KzmEmmw0B3k0WwKWwd1EMO4h8Jb4 NaOem8qO1jBgDR2NgSOka9gv04hpWpaIdR/sR8Zt9gtQoU1MYJkTL1DBb8ShKk+b/3y1i3 Tv5TCsDXy0H1av8i+MEwO0uuuCJmZX74EFS69q61MKeKAgJyC1K7bXqmplbo2rzFZ1L2X5 Pjj3VuUCptjavwROUC7XIvrwA9O3MPZ+qb150/KQ67nvb0Hwj7JiR1l+aJQvSFKZStBVs1 F0Q00LuVMtWPL0KODrxzNYioLzKtDeEIaqlWwjOOymnxh0Yg2Uwfg2h9obFs4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650425414; a=rsa-sha256; cv=none; b=QSjUcgyzzkuNyUiK4wCyLWYnPklFI8s063AR9o72cSb9pLcscPkju+nTc39Gfv5aSKaiZn AuK1OqrAE7k2ctcpPJak6ZJOkinPWGzF8Q3QxxrjdEwhTmXVmhGz1MY+9VcKvXnqvpxyPU ornqtOmLa/ka/0N6vjcs9u5BFg8d0LxniUENXLue4Mxxf7VcrxeIp+DLddyGdVJJtWojhZ Z0HJYxy7nhTd72zkOfujXB8/2YBNVKeZZgM+J4WfVTik3jPcK1hj8DkpKkYHWPMA7c4Yn6 CpNapPdOZFfS+Wpi/zzCj3/Xvc4H11hhRM2H5TYVpao3FngC1fDzvCMwq7w9Ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1bb77846adee4a44c38a7b5777749357b1b9ff20 commit 1bb77846adee4a44c38a7b5777749357b1b9ff20 Author: Ed Maste AuthorDate: 2022-04-06 23:39:19 +0000 Commit: Ed Maste CommitDate: 2022-04-20 00:31:29 +0000 vidcontrol: disable p, P, and H when vt(4) is in use These options use the CONS_SCRSHOT ioctl to capture the contents of the current console, which is not yet supported by vt(4). Disable the options when vt(4) is in use rather than emitting a possibly confusing error message. This change should be reverted if CONS_SCRSHOT is implemented for vt(4). PR: 263099 MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit c71ae91f1976746b380a8aada8676d7ae084fdc5) (cherry picked from commit 1f4442f71fa33a8ef6d3da808e32872fb23a5700) (cherry picked from commit 4aa249b5f367c3fe0aec287bbf156131ec75ebd3) --- usr.sbin/vidcontrol/vidcontrol.1 | 6 +++++- usr.sbin/vidcontrol/vidcontrol.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/usr.sbin/vidcontrol/vidcontrol.1 b/usr.sbin/vidcontrol/vidcontrol.1 index 4a6497a6e819..9d35528accc5 100644 --- a/usr.sbin/vidcontrol/vidcontrol.1 +++ b/usr.sbin/vidcontrol/vidcontrol.1 @@ -13,7 +13,7 @@ .\" @(#)vidcontrol.1 .\" $FreeBSD$ .\" -.Dd January 19, 2016 +.Dd April 6, 2022 .Dt VIDCONTROL 1 .Os .Sh NAME @@ -382,12 +382,16 @@ For details about that format see .Sx Format of Video Buffer Dump below. +Supported only with +.Xr syscons 4 . .It Fl P Same as .Fl p , but dump contents of the video buffer in a plain text format ignoring nonprintable characters and information about text attributes. +Supported only with +.Xr syscons 4 . .It Fl H When used with .Fl p diff --git a/usr.sbin/vidcontrol/vidcontrol.c b/usr.sbin/vidcontrol/vidcontrol.c index 67c0a9d3f8a5..848ef5401f31 100644 --- a/usr.sbin/vidcontrol/vidcontrol.c +++ b/usr.sbin/vidcontrol/vidcontrol.c @@ -196,7 +196,7 @@ usage(void) { if (vt4_mode) fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n", -"usage: vidcontrol [-CHPpx] [-b color] [-c appearance] [-f [[size] file]]", +"usage: vidcontrol [-Cx] [-b color] [-c appearance] [-f [[size] file]]", " [-g geometry] [-h size] [-i active | adapter | mode]", " [-M char] [-m on | off]", " [-r foreground background] [-S on | off] [-s number]", @@ -1410,7 +1410,7 @@ main(int argc, char **argv) dumpopt = DUMP_FBF; termmode = NULL; if (vt4_mode) - opts = "b:Cc:fg:h:Hi:M:m:pPr:S:s:T:t:x"; + opts = "b:Cc:fg:h:i:M:m:r:S:s:T:t:x"; else opts = "b:Cc:dfg:h:Hi:l:LM:m:pPr:S:s:T:t:x";