From nobody Thu Aug 10 14:58:32 2023 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 4RM96J6kXPz4mNb5; Thu, 10 Aug 2023 14:58: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 4RM96J6CNSz3dpL; Thu, 10 Aug 2023 14:58:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691679512; 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=Nwpm/emmKT/iH9f41morHuzAnfzGWhDAupZgHcqRwvU=; b=uDgfeJrt1iaSZkkdqG8PZTugQZaIr7AQEBUn9f5b4voDds6ssa5AYcfTOBTR89mLCC+RAA G4zLMkyISAMOq6e7lZul0YEqguBm5pUEFMf0a8PudFasvQLxvsdDZ3fXOrp10tf3xUd+/F WTIfkzSigPkEyIhKFLPu+btGiKOwg0zeaQEthlkIjAE7dfs/H5xY8iEEn5KVTiKyTs7uFY 4aPnS9YeSeZZQrGbwQjjntZhdjIKd2UFX6Mz7e1E3r73loCuBcD17Yg6c54ZyA5WEHNEgQ 79VtClqtIboXPEgs14UxjczGVb0vA7UfHA6qSHGLac2UwjEWdOiOKoJY7fUt2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691679512; 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=Nwpm/emmKT/iH9f41morHuzAnfzGWhDAupZgHcqRwvU=; b=pLuOo1PKlZ3rHrwieDDEHBAxPcDLG/s1afUw9s5orNyML4PVKTgBv9HZowjlYcPXZL0mVI nY7lgQDXd3QsvzHa9SYPt5zmf53NBI/mvXCup9V4ZJlw2GuSq3eRnx93W9onn4O+IrcoUW 7wCAPfd8DXZ3++9LmWJxOOW6WcAYAdBkyMXtzFp9bXf8aG2Us4R0fHMDM070bNss+9wOql meDuR+An1i9++69DKdz5sywwkUfbLlUSfy5nNi06kFaPn5ycT+w0x+YJz4OwBjiFoOzP9g LVIiNg8bc/rpp1j3XZZpqo/Gk2pGa5LAXps5NbHfKUon/k6xbkY3/ZcyKap/UQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691679512; a=rsa-sha256; cv=none; b=ltNdnhduwKUE2g0ITK/PfYQCGUg1iyiJL2yDtpRpjNq2dYpATL9iOkGH+GmbiOEeHD9tQV 3c5MUH8t9ouKM4/V8/7G9kQbG0N0Zg4GgopDDUQmEkkTtVsEKOMhym3tBuhj9dMFM+jwxj P25pb/H4GAAB/1hUDh2VCtPcDyAmjRMHHuFTD5kMZRgmcTJyeTiGiJc256FmdMXkhoHACg ys8xMNSeerhyV054ZdDTcOWvC5Upmy8s/1Znsc3x8HjUFXO81ea6Dv+Q3Gm6aKtB1qEC4K 23TGn3YSkBR3OCKQMKeqCCcV+qxUQC3a/wsLcbbKgfpyBIVecxwSiYUbpXaNEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RM96J5J8dz11d1; Thu, 10 Aug 2023 14:58: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 37AEwW7f076489; Thu, 10 Aug 2023 14:58:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37AEwWeL076486; Thu, 10 Aug 2023 14:58:32 GMT (envelope-from git) Date: Thu, 10 Aug 2023 14:58:32 GMT Message-Id: <202308101458.37AEwWeL076486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: 4ff782c06a56 - main - tcopy: Pick up max blocksize from sysctl kern.maxphys 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: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4ff782c06a56281b113df6dbf48bb397ddcb020a Auto-Submitted: auto-generated The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=4ff782c06a56281b113df6dbf48bb397ddcb020a commit 4ff782c06a56281b113df6dbf48bb397ddcb020a Author: Poul-Henning Kamp AuthorDate: 2023-08-10 14:56:53 +0000 Commit: Poul-Henning Kamp CommitDate: 2023-08-10 14:58:18 +0000 tcopy: Pick up max blocksize from sysctl kern.maxphys --- usr.bin/tcopy/tcopy.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.bin/tcopy/tcopy.c b/usr.bin/tcopy/tcopy.c index 24dcc969a9af..ef0da430002e 100644 --- a/usr.bin/tcopy/tcopy.c +++ b/usr.bin/tcopy/tcopy.c @@ -52,6 +52,7 @@ static const char sccsid[] = "@(#)tcopy.c 8.2 (Berkeley) 4/17/94"; #include #include #include +#include #include #include #include @@ -82,6 +83,11 @@ main(int argc, char *argv[]) int ch, needeof; char *buff; const char *inf; + unsigned long maxphys = 0; + size_t l_maxphys = sizeof maxphys; + + if (!sysctlbyname("kern.maxphys", &maxphys, &l_maxphys, NULL, 0)) + maxblk = maxphys; msg = stdout; guesslen = 1;