git: 9fd9ba30cc20 - stable/13 - ctladm: don't require the use of "-p" with "port -r", part 2

From: Alan Somers <asomers_at_FreeBSD.org>
Date: Sat, 20 Jul 2024 14:57:24 UTC
The branch stable/13 has been updated by asomers:

URL: https://cgit.FreeBSD.org/src/commit/?id=9fd9ba30cc20011c07435d6ac19ac08717fd5d0a

commit 9fd9ba30cc20011c07435d6ac19ac08717fd5d0a
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2024-07-04 20:32:24 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2024-07-20 14:56:36 +0000

    ctladm: don't require the use of "-p" with "port -r", part 2
    
    * Remove a now superfluous FALLTHROUGH hint
    * Don't specify "-p" with an empty argument in the tests
    
    Reported by:    jhb
    
    (cherry picked from commit 7f50027321db3b08477f6236abded0297e9e5ed8)
---
 usr.sbin/ctladm/ctladm.c      | 1 -
 usr.sbin/ctladm/tests/port.sh | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c
index 194f0647fe7f..71f187df931e 100644
--- a/usr.sbin/ctladm/ctladm.c
+++ b/usr.sbin/ctladm/ctladm.c
@@ -575,7 +575,6 @@ cctl_port(int fd, int argc, char **argv, char *combinedopt)
 		break;
 	}
 	case CCTL_PORT_MODE_REMOVE:
-		/* FALLTHROUGH */
 	case CCTL_PORT_MODE_CREATE: {
 		bzero(&req, sizeof(req));
 		strlcpy(req.driver, driver, sizeof(req.driver));
diff --git a/usr.sbin/ctladm/tests/port.sh b/usr.sbin/ctladm/tests/port.sh
index 633dec2fd273..a9ff609d3f4c 100644
--- a/usr.sbin/ctladm/tests/port.sh
+++ b/usr.sbin/ctladm/tests/port.sh
@@ -62,7 +62,7 @@ cleanup() {
 			;;
 		"iscsi")
 			TARGET=`awk '/target:/ {print $2}' port-create.txt`
-			ctladm port -r -d $driver -p "$PORTNUM" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target=$TARGET
+			ctladm port -r -d $driver -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target=$TARGET
 			;;
 		esac
 	fi