From nobody Thu Apr 18 15:39:32 2024 X-Original-To: dev-commits-src-main@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 4VL25J5wKqz5H5VX; Thu, 18 Apr 2024 15:39:32 +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 4VL25J5MTYz4rpH; Thu, 18 Apr 2024 15:39:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713454772; 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=O1XGp2D7j5VPrChUu8j+y2qhbCrnm+Opdp5/q1Mqwuc=; b=cXy8NuizQ0Vrq6SviJkV9vWXhTc6x+CsH8FfqutYblO1oUXeGeAAzDyewSw8OubvQcP6/y kj69s+FAggk9B03MXHkO3jGRbImDgsazyFIX4jl4Oae81V7iRRuHIscJbVPdLDtuTEwaUW VAsDSOg26AHp2Ghz357UM0rkYUoCayDRDJDK7qq0PUgcB1f2WO16dcs+EgueYT6a2OVpwa WzOVgYbfFkXmO3n087d24lM+DWt2SiSTbmU37tDZrARYBRYczIo/+hDVRFz2hlw5Tnmkzu jzmrTXpQCFQU7QWa5u+laZkx9lQ5KPUD7Vpxq5VOF+C8gY4mb53taXma9+Ksaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713454772; a=rsa-sha256; cv=none; b=em6N5y8BKjsjdmNgGUxcTVfnAJ0KyCRhNEolOJTE8Gh0opUe5vzqcHHFpQCVFtUsQWOS+b i6rLhw7B6DzIV9qo6eBgF8287WbTLKDCZtkf6f66AS9wsGZ16CQ7bxCzS4PBoW4m3uDzQ0 Cw6q07lHOeX0NWFzLYZaU+f6En3QuYLAwZDYU4+xIE6ec1AgpjT9UN8M6BRy7gFNCjlIKE 1oDcwKARgOSoRiA0VGOX8/NMkOpDFU3hk6ro334Fmw5TKR35gU4AuRQQh3rIVcLvm5Pjdk jvZ9JW4kkSZ3AWPpc6P0meDIJIyJKalB0hq37tj9op/fwQharbTqFDTpgTxdKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713454772; 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=O1XGp2D7j5VPrChUu8j+y2qhbCrnm+Opdp5/q1Mqwuc=; b=VnedA0Dr8/3ZyCNJVG5TbioZWqW4ht1vYhh5H6tsuO3emF9oiMoUVlSVEidP0ccguer5tN nYezSNJdfHLU/CP7RxSMdGOXEcoji6/n1SIyv0lcJ7+U6JseQGUc5Emo5g7Ysqh3hNnYOd jM9qNkyq4ch3ozdYrdEHKendxsM2s98BsdzQIA6laEu4MDyDXzHh28XCYuVihFIOO9D2LJ evft2BSCBD2MTm4Tzw4Zh7O8Os9smxwNXBkqWSafUC5QFYiAZtCX8WaeL2gcF6ajonYaIa keraUxHcrUBmm4lRo/ptnFwBbDY8qoe+gFdkeVmBv2mW/9diH5tM1CmJXMRhHw== 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 4VL25J4rbwzG9D; Thu, 18 Apr 2024 15:39:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 43IFdWOY045927; Thu, 18 Apr 2024 15:39:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43IFdWQo045924; Thu, 18 Apr 2024 15:39:32 GMT (envelope-from git) Date: Thu, 18 Apr 2024 15:39:32 GMT Message-Id: <202404181539.43IFdWQo045924@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 464b1ab216d5 - main - dumpon: fix set but not used variable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 464b1ab216d5f78054626524addf99f5c622da96 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=464b1ab216d5f78054626524addf99f5c622da96 commit 464b1ab216d5f78054626524addf99f5c622da96 Author: inkeliz AuthorDate: 2024-04-17 21:22:44 +0000 Commit: Mark Johnston CommitDate: 2024-04-18 15:39:16 +0000 dumpon: fix set but not used variable Signed-off-by: inkeliz Reviewed by: markj MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1178 --- sbin/dumpon/dumpon.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sbin/dumpon/dumpon.c b/sbin/dumpon/dumpon.c index dd772ca75049..46652d8471eb 100644 --- a/sbin/dumpon/dumpon.c +++ b/sbin/dumpon/dumpon.c @@ -463,20 +463,23 @@ main(int argc, char *argv[]) struct diocskerneldump_arg ndconf, *kdap; struct addrinfo hints, *res; const char *dev, *pubkeyfile, *server, *client, *gateway; - int ch, error, fd, cipher; + int ch, error, fd; bool gzip, list, netdump, zstd, insert, rflag; uint8_t ins_idx; +#ifdef HAVE_CRYPTO + int cipher = KERNELDUMP_ENC_NONE; +#endif gzip = list = netdump = zstd = insert = rflag = false; kdap = NULL; pubkeyfile = NULL; server = client = gateway = NULL; ins_idx = KDA_APPEND; - cipher = KERNELDUMP_ENC_NONE; while ((ch = getopt(argc, argv, "C:c:g:i:k:lrs:vZz")) != -1) switch ((char)ch) { case 'C': +#ifdef HAVE_CRYPTO if (strcasecmp(optarg, "chacha") == 0 || strcasecmp(optarg, "chacha20") == 0) cipher = KERNELDUMP_ENC_CHACHA20; @@ -487,6 +490,11 @@ main(int argc, char *argv[]) errx(EX_USAGE, "Unrecognized cipher algorithm " "'%s'", optarg); break; +#else + errx(EX_USAGE, + "Built without crypto support, -C is unhandled."); + break; +#endif case 'c': client = optarg; break;