From nobody Sat Dec 28 23:33:04 2024 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 4YLJZS5hB0z5jP0h; Sat, 28 Dec 2024 23:33:04 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YLJZS3Nknz4JfG; Sat, 28 Dec 2024 23:33:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735428784; 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=mVgmvl/+DogDcfuMRhltaiLDsI+npLB9Lp/xYgQU5ZQ=; b=gBrEdcS4i7Ul1i31EepjNk3ES2znByL4o1FLdF7wj1z2wmlm21tVkSjFolNrHQhC7twLUz eDREHCpmLaF9lnQ5SruJVGIwZDS8SYZTXkQ0vWoj0/ui6g+OFxU7W3YBog2m58CxHLUxsL H03ZZt3nh9OT2zfB4hqEoFC7P86Y6o1xlSOJWIMCAwDPAtL6qhXRBwi5nTl0+elDpRCIim IHLqKc3xrYPoa6Iswnh8yllijR/RLopGIAiBFufDX6KQSbfoTW/aUvczXemGTc509bpkt4 4iibX6cYwkXjBOwg7b03KZnqtwDPlgernS0YpVKS3jmRurrfT0ZbI18qoNoQVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735428784; 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=mVgmvl/+DogDcfuMRhltaiLDsI+npLB9Lp/xYgQU5ZQ=; b=XwAflVJsTRy7jqB74HLvyLFF4RLnu8nHsptIp0I6U8Fudo/0t4UHFabUsC41aelBaGBLER gDBcEdxF3wW2Z028eHQYRgh3Z63pTtqJMo4SkJPOuhfI/L4OJndp7+FpKjgIRJPG53fOIk amafED0o7qu03aSaWym3C/mPi/Isy+Qw2IiyYgLwc4TQpBIw9Do2Cnw3oQtXrlCOlkJxSq fYPQb3P/5x4ni7ecGMqfcVIXf5s8uKdgIl8preDLQ4t4EXpv7DPARpVy/RHQT276WJJV6M 5/Jdjxp0gJqEbA18mtKY0K2M2iLEHWhihYbaKhHmmD0GuXUFIlH1hh/hZk4Kgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735428784; a=rsa-sha256; cv=none; b=I41SdgwMHQK4dl6ju9EQZ0voTfLOHiheJwSfLwPmoyXoU/h85mRfUckBxJndfdTIbZha9y dzPkCbIbYiqCvQBrDp/X1xWhlW1/OH79BoIazxqt3P4lCA5v/OL7aS/8m3KTTSocmttgwz 3LAHXOex7fZzShoX4PYG9a0uMIg/eob/S6tBBbn/ven20f69SH5wP+NadVvgAeSQNRKxS7 wgFyg80rl+1HIULrflQD0NXxfAAuyq8VIHTRC5sUDIWsJ8HboOp7cK6GQqG1ncFo0yVh0T HwAB9VQtQj6QUWq9jFdZXwAp2QymRR0XUAA9Gson1h9hZBUienNl1eAaxye+Yw== 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 4YLJZS30YrzlfB; Sat, 28 Dec 2024 23:33:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BSNX4TH062591; Sat, 28 Dec 2024 23:33:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BSNX4nJ062588; Sat, 28 Dec 2024 23:33:04 GMT (envelope-from git) Date: Sat, 28 Dec 2024 23:33:04 GMT Message-Id: <202412282333.4BSNX4nJ062588@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Maxim Konovalov Subject: git: 8408510c7769 - main - ping: adjust error messages and comments for -gGh flags 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: maxim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8408510c7769e5d78f882de9c7c30e93af25aedc Auto-Submitted: auto-generated The branch main has been updated by maxim: URL: https://cgit.FreeBSD.org/src/commit/?id=8408510c7769e5d78f882de9c7c30e93af25aedc commit 8408510c7769e5d78f882de9c7c30e93af25aedc Author: Maxim Konovalov AuthorDate: 2024-12-28 21:19:28 +0000 Commit: Maxim Konovalov CommitDate: 2024-12-28 23:32:32 +0000 ping: adjust error messages and comments for -gGh flags The -gGh flags are used for sweep ping to specify minimal, maximum and increment sizes for the ICMP payload, not the packet size. Adjust the error messages and comments accordingly. Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D48232 --- sbin/ping/ping.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index c11113fdd72d..2efe8d41f160 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -313,30 +313,30 @@ ping(int argc, char *const *argv) options |= F_DOT; setbuf(stdout, (char *)NULL); break; - case 'G': /* Maximum packet size for ping sweep */ + case 'G': /* Maximum payload size for ping sweep */ ltmp = strtonum(optarg, 1, INT_MAX, &errstr); if (errstr != NULL) { - errx(EX_USAGE, "invalid packet size: `%s'", + errx(EX_USAGE, "invalid payload size: `%s'", optarg); } sweepmax = (int)ltmp; if (uid != 0 && sweepmax > DEFDATALEN) { errc(EX_NOPERM, EPERM, - "packet size too large: %d > %u", + "payload size too large: %d > %u", sweepmax, DEFDATALEN); } options |= F_SWEEP; break; - case 'g': /* Minimum packet size for ping sweep */ + case 'g': /* Minimum payload size for ping sweep */ ltmp = strtonum(optarg, 0, INT_MAX, &errstr); if (errstr != NULL) { - errx(EX_USAGE, "invalid packet size: `%s'", + errx(EX_USAGE, "invalid payload size: `%s'", optarg); } sweepmin = (int)ltmp; if (uid != 0 && sweepmin > DEFDATALEN) { errc(EX_NOPERM, EPERM, - "packet size too large: %d > %u", + "payload size too large: %d > %u", sweepmin, DEFDATALEN); } options |= F_SWEEP; @@ -344,16 +344,16 @@ ping(int argc, char *const *argv) case 'H': options |= F_HOSTNAME; break; - case 'h': /* Packet size increment for ping sweep */ + case 'h': /* Payload size increment for ping sweep */ ltmp = strtonum(optarg, 1, INT_MAX, &errstr); if (errstr != NULL) { - errx(EX_USAGE, "invalid packet size: `%s'", + errx(EX_USAGE, "invalid payload size: `%s'", optarg); } sweepincr = (int)ltmp; if (uid != 0 && sweepincr > DEFDATALEN) { errc(EX_NOPERM, EPERM, - "packet size too large: %d > %u", + "payload size too large: %d > %u", sweepincr, DEFDATALEN); } options |= F_SWEEP;