From nobody Thu Sep 19 18:54:31 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 4X8l7C5Dwcz5X7RL; Thu, 19 Sep 2024 18:54:31 +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 4X8l7C4S4Lz4JlF; Thu, 19 Sep 2024 18:54:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1726772071; 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=8FpBJgotnt7SZeHgpR0fr39WSCjTaq9Q0nINM4y9SgU=; b=T0ZkOEVvJko6GG66o7yNxNQ40ZDU0d+dRfYAvHMXxsv6x5yHV7GFrAYqpX4rMFc3k797qQ /E9gx4OLpNDZpLp5PU0Per8BWBoifAE5iRQtVyEfMEtiED1pLCcz+PgmM3YIAk4j3N1wcv T2xs/yB+0flaxl/hCJ20ciOZ3E31FKYsGKc9YTS+OChQjAQusCmzRGKMXzRuzfgwkLKfHt Q8SDliYT4PnNuetAvrjgscQy+arlPBqtwyd2hlj39GcXTw2NqFqRkL7mMqq9z+JlRQRzA8 La9QqNBabbr+zWBRZg7JjPoE2l940RrmBLzSDKf5NOsz39oMem/UJMDOuCkz0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1726772071; a=rsa-sha256; cv=none; b=KOcLv4PYTBTqWFOsKpj+FbMYdhBHP+Q+lYPfrj6qMVs0t989L/Utc5c/VV36O045upfT5o d3QBEM1cUAnxepYKEiMd+TRP7dN/Frw09nKv4SYWUts/kIAzwIiJnhV72WbIcA8XKMd3j1 l260E47m58/3jQbxhdmvdaEqOcGJmCtuVbJa/AYL2hNyxVs7xnXGAl2GyvmYNTFFgp8emT 7vmjTPQQ7SIqH6jrN37Jr9OtmeRiu+n/xiqtzY3P0BDe/IQoYgOIvQKNIIDi71HTN2R33I sVQnkAlo18rBu9RXVSN1wvApC75AxaAprjHfuX/efOPzATvNsGBSZqeL9RVP0Q== 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=1726772071; 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=8FpBJgotnt7SZeHgpR0fr39WSCjTaq9Q0nINM4y9SgU=; b=WkC0YZGZTNg/66fkf/v/Z8RK2HlNrBz2WAHtPDgAWEbbxb3Mz5rMaGOif4sAHfI7osqF8n ihB4AobjuBA1kXTGLNYcslXVZiGt8aPvsthoGKQbiAuuMmkuU6LLcY+nobY5/qlJMXTDDF ByGQrKFp2qrngu52tjos5o1fqEUq9sk5i9gr2KEaJXNnBSBlrgnFIzZwh6p2oHWp2F1e1H 0RkxS5tgU5ztSVh6MpwCq0gSQohxRmk2NHWq0cU87R04mKevXLgdO7TBJ+PVq5pP3EiIPE 78jAU1d7k1q1rn4//xhDYaADpXfAdc2R7+Hg9SPr4eWOSaZgw6nwEMmR0aGk1Q== 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 4X8l7C43B0zHSK; Thu, 19 Sep 2024 18:54:31 +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 48JIsVYs096596; Thu, 19 Sep 2024 18:54:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 48JIsVZH096593; Thu, 19 Sep 2024 18:54:31 GMT (envelope-from git) Date: Thu, 19 Sep 2024 18:54:31 GMT Message-Id: <202409191854.48JIsVZH096593@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alan Somers Subject: git: 624a521c1885 - stable/14 - ctladm.8: fix several errors in the "port" section 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: asomers X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 624a521c1885f58690ac9291f10d7b9f9545f219 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=624a521c1885f58690ac9291f10d7b9f9545f219 commit 624a521c1885f58690ac9291f10d7b9f9545f219 Author: Alan Somers AuthorDate: 2024-06-05 20:13:04 +0000 Commit: Alan Somers CommitDate: 2024-09-19 18:53:44 +0000 ctladm.8: fix several errors in the "port" section * Document the "-d" option. * Add the "-c" and "-r" options to the summary. * Correct the list of required options. * Clarify that the "-t" option is only for use with "-o", "-w", and "-W" * Replace references to the nonexistent "-n" with "-p". Also, fix a few related error strings in the ctladm command. Sponsored by: Axcient Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D45503 (cherry picked from commit 60107d23d8f2c05f418c024000a31a6148d2f7de) --- usr.sbin/ctladm/ctladm.8 | 32 ++++++++++++++++++++++++++++---- usr.sbin/ctladm/ctladm.c | 7 ++++--- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/usr.sbin/ctladm/ctladm.8 b/usr.sbin/ctladm/ctladm.8 index ba2712cb278c..4e7288dac6b6 100644 --- a/usr.sbin/ctladm/ctladm.8 +++ b/usr.sbin/ctladm/ctladm.8 @@ -35,7 +35,7 @@ .\" .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" -.Dd December 27, 2023 +.Dd June 5, 2024 .Dt CTLADM 8 .Os .Sh NAME @@ -162,6 +162,7 @@ .Nm .Ic port .Op Fl c +.Op Fl d Ar driver .Op Fl o Ar on|off .Op Fl w Ar wwpn .Op Fl W Ar wwnn @@ -591,6 +592,10 @@ The serial number is returned when the error is injected. Perform one of several CTL frontend port operations. Either get a list of frontend ports .Pq Fl l , +create a new frontend port +.Pq Fl c , +destroy a frontend port +.Pq Fl r , turn one or more frontends on or off .Pq Fl o Ar on|off , @@ -600,6 +605,8 @@ or World Wide Port Name .Pq Fl W Ar wwpn for a given port. One of +.Fl c , +.Fl r , .Fl l , .Fl o , or @@ -612,6 +619,18 @@ combined with enabling/disabling or listing ports. .Bl -tag -width 12n .It Fl c Create new frontend port using free pp and vp=0. +.It Fl d Ar driver +Specify the name of the frontend driver used by the +.Pq Fl c +or +.Pq Fl r +subcommands. +Valid driver names include +.Dq ioctl , +.Dq iscsi , +and +.Dq nvmf , +but more can be added by external kernel modules. .It Fl o Ar on|off Turn the specified CTL frontend ports on or off. If no port number or port type is specified, all ports are turned on or @@ -626,7 +645,12 @@ The port numbers can be found in the frontend port list. Remove port specified with .Pq Fl p Ar targ_port . .It Fl t Ar fe_type -Specify the frontend type. +Specify the frontend type used by the +.Pq Fl o , +.Pq Fl w , +and +.Pq Fl W +subcommands. Currently defined port types are .Dq fc (Fibre Channel), @@ -640,7 +664,7 @@ and .It Fl w Ar wwnn Set the World Wide Node Name for the given port. The -.Fl n +.Fl p argument must be specified, since this is only possible to implement on a single port. As a general rule, the WWNN should be the same across all ports on the @@ -648,7 +672,7 @@ system. .It Fl W Ar wwpn Set the World Wide Port Name for the given port. The -.Fl n +.Fl p argument must be specified, since this is only possible to implement on a single port. As a general rule, the WWPN must be different for every port in the system. diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c index 4426274fdd44..91469aef40a7 100644 --- a/usr.sbin/ctladm/ctladm.c +++ b/usr.sbin/ctladm/ctladm.c @@ -541,7 +541,7 @@ cctl_port(int fd, int argc, char **argv, char *combinedopt) * we'll throw an error, since that only works on one port at a time. */ if ((port_type != CTL_PORT_NONE) && (targ_port != -1)) { - warnx("%s: can only specify one of -t or -n", __func__); + warnx("%s: can only specify one of -t or -p", __func__); retval = 1; goto bailout; } else if ((targ_port == -1) && (port_type == CTL_PORT_NONE)) @@ -625,7 +625,7 @@ cctl_port(int fd, int argc, char **argv, char *combinedopt) } case CCTL_PORT_MODE_SET: if (targ_port == -1) { - warnx("%s: -w and -W require -n", __func__); + warnx("%s: -w and -W require -p", __func__); retval = 1; goto bailout; } @@ -674,7 +674,8 @@ bailout: return (retval); bailout_badarg: - warnx("%s: only one of -l, -o or -w/-W may be specified", __func__); + warnx("%s: only one of -c, -r, -l, -o or -w/-W may be specified", + __func__); return (1); }