From nobody Mon Jul 01 21:08:53 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 4WCdvB20Fmz5Q4SN; Mon, 01 Jul 2024 21:08:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WCdvB1Lq0z3ynw; Mon, 1 Jul 2024 21:08:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719868134; 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: in-reply-to:in-reply-to:references:references; bh=UYGxo8pShentPbfGWu9Ib60T/h38tjVNo85g5w44NQ0=; b=JaGH3kJpGKRM5kDG+5hFdm/IVU9VIz5hxNuHap3zI1NJSsulIpEY6n/jh/1133OEgHsJhG EAJ9SKnUuOEkYVQ8XJQ+m4kiH5jCBA6Y4WMDwdFebfeR225K3bkb/pF5FRns4wjQW1XZqR h91QI5RD0oxVlY1rK0IRNM8DGe+ZSECoSe+GtEu7jfLNljfdFbBNb62fEUzbWtdhGONoDq zNh4xeGHEErO8JL+rcbbUiMhZ2mjzWEsQRi9CprFznYVsF1aGXUb8bhdrJAklu4zwUDoMt NeWhYfG44G2VCIpuFrik1SgD6D9ulyf/SuHhRlzWZaRpBzkLSrm6aVodl4VKzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719868134; a=rsa-sha256; cv=none; b=xPhrWdfhAVk5OTIyEjtW5v6PbAi7GWHKmWVujCtr/eSuqsUcD8C8w9CEZ0aMd8MKDhyFO+ wXGeVbb4uRk4JIsTr4Ey5y/4hDUzkxRvPKAn6khmgAWiUtPiE3vh4W8f06cqhU9cQqCRM4 UuMCxp04+TzJsyRYZLryzH9X1zCTbjgcIydUJXGBaGzNICTO3N9gF/hXxgAFu+R5cri5W1 CKs7v3s0LIjZNSzmhUjP0fVBH7sP/HEfu38ronYSsP6dXDJfRq78nv8LbrnDY2RmwaOMA2 dUMRnCgIO/xtvaTpoVDaLUgzyzW1E78j9VNcaU05bD8+OMkIbtrTQGzI2thAJQ== 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=1719868134; 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: in-reply-to:in-reply-to:references:references; bh=UYGxo8pShentPbfGWu9Ib60T/h38tjVNo85g5w44NQ0=; b=hcTIjBaHGFmeKUmvKOjw07lgSiOKkDOgw4fTbNSdOSX9TnsbjAp/r23KhAkmQly9WRhvm8 L4hVWZkJFEzlkcUPanva/i41beIWh+rkbP3SJok6YDWnT2PEmUj4JlvKvArj/i2ZiTMG1Y xaxCePimGBiwS8hAqZkg+xeKrmtE7B0oMPub1x3uom2ilD+3r1In6lE8ZP2kleV7qmEBHc 5msOmDjf/8qrIrj9b0a9K2aGcfsUmLAmweeNXX7P9mb8kaZ1udaQCxYVBHJp1etDnqQZX2 fJnewau6lRaevt49CCXw39NOiDfwjFaHB5w2MUHhp9/iX7qLK2LqtOcysQU6Sw== Received: from [IPV6:2601:5c0:4200:b830:198e:c253:cce:4f0] (unknown [IPv6:2601:5c0:4200:b830:198e:c253:cce:4f0]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4WCdv96Zt0zWrR; Mon, 1 Jul 2024 21:08:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Mon, 1 Jul 2024 17:08:53 -0400 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 User-Agent: Mozilla Thunderbird Subject: Re: git: edbd489d09ba - main - ctladm: don't require the use of "-p" with "port -r" Content-Language: en-US To: Alan Somers , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202406101601.45AG1jSb001516@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202406101601.45AG1jSb001516@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 6/10/24 9:01 AM, Alan Somers wrote: > The branch main has been updated by asomers: > > URL: https://cgit.FreeBSD.org/src/commit/?id=edbd489d09babebdc6c03924a912013be584c409 > > commit edbd489d09babebdc6c03924a912013be584c409 > Author: Alan Somers > AuthorDate: 2024-06-06 19:14:43 +0000 > Commit: Alan Somers > CommitDate: 2024-06-10 16:01:25 +0000 > > ctladm: don't require the use of "-p" with "port -r" > > When removing a port, the ioctl frontend requires the "-p" argument. > But other frontends, like cfiscsi, do not. So don't require that > argument in the ctladm command. The frontend driver will report an > error if any required argument is missing. > > MFC after: 2 weeks > Sponsored by: Axcient > Reviewed by: mav > Pull Request: https://github.com/freebsd/freebsd-src/pull/1279 > --- > sys/cam/ctl/ctl_frontend_ioctl.c | 2 +- > usr.sbin/ctladm/ctladm.8 | 3 +-- > usr.sbin/ctladm/ctladm.c | 10 +++------- > usr.sbin/ctladm/tests/port.sh | 28 +++++++++++++++++++++++----- > 4 files changed, 28 insertions(+), 15 deletions(-) > > diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c > index 14951797ddf1..46b7b88547dd 100644 > --- a/usr.sbin/ctladm/ctladm.c > +++ b/usr.sbin/ctladm/ctladm.c > @@ -580,11 +580,6 @@ cctl_port(int fd, int argc, char **argv, char *combinedopt) > break; > } > case CCTL_PORT_MODE_REMOVE: > - if (targ_port == -1) { > - warnx("%s: -r requires -p", __func__); > - retval = 1; > - goto bailout; > - } > /* FALLTHROUGH */ Should we just remove the FALLTHOUGH now? > case CCTL_PORT_MODE_CREATE: { > bzero(&req, sizeof(req)); > diff --git a/usr.sbin/ctladm/tests/port.sh b/usr.sbin/ctladm/tests/port.sh > index 1f2c9aaed5c1..139e1a7d29a0 100644 > --- a/usr.sbin/ctladm/tests/port.sh > +++ b/usr.sbin/ctladm/tests/port.sh > @@ -37,8 +37,6 @@ cleanup() { > ;; > "iscsi") > TARGET=`awk '/target:/ {print $2}' port-create.txt` > - # PORTNUM is ignored, but must be set > - PORTNUM=9999 > ctladm port -r -d $driver -p "$PORTNUM" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target=$TARGET You still use PORTNUM here even though you don't define it? > ;; > esac -- John Baldwin