Page MenuHomeFreeBSD

D45503.diff
No OneTemporary

D45503.diff

diff --git a/usr.sbin/ctladm/ctladm.8 b/usr.sbin/ctladm/ctladm.8
--- 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 May 2, 2024
+.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
@@ -598,6 +599,10 @@
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 ,
@@ -607,6 +612,8 @@
.Pq Fl W Ar wwpn
for a given port.
One of
+.Fl c ,
+.Fl r ,
.Fl l ,
.Fl o ,
or
@@ -619,6 +626,18 @@
.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
@@ -633,7 +652,12 @@
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),
@@ -647,7 +671,7 @@
.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
@@ -655,7 +679,7 @@
.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
--- a/usr.sbin/ctladm/ctladm.c
+++ b/usr.sbin/ctladm/ctladm.c
@@ -546,7 +546,7 @@
* 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))
@@ -630,7 +630,7 @@
}
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;
}
@@ -679,7 +679,8 @@
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);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 5, 11:26 PM (21 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13686416
Default Alt Text
D45503.diff (2 KB)

Event Timeline