From owner-svn-src-all@freebsd.org Tue Aug 6 18:15:27 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CB5D9C75AE; Tue, 6 Aug 2019 18:15:27 +0000 (UTC) (envelope-from imp@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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4632qg52HKz4K0D; Tue, 6 Aug 2019 18:15:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8EFE92FDE5; Tue, 6 Aug 2019 18:15:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x76IFRqe081461; Tue, 6 Aug 2019 18:15:27 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x76IFRo2081459; Tue, 6 Aug 2019 18:15:27 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908061815.x76IFRo2081459@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 6 Aug 2019 18:15:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350652 - head/sbin/nvmecontrol X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sbin/nvmecontrol X-SVN-Commit-Revision: 350652 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Aug 2019 18:15:27 -0000 Author: imp Date: Tue Aug 6 18:15:26 2019 New Revision: 350652 URL: https://svnweb.freebsd.org/changeset/base/350652 Log: Fix mismerge. I merged passthru.c from the wrong branch (it was a branch that went further in a direction I wound up not taking). Fix the mismerge and turn passthru on. Modified: head/sbin/nvmecontrol/Makefile head/sbin/nvmecontrol/passthru.c Modified: head/sbin/nvmecontrol/Makefile ============================================================================== --- head/sbin/nvmecontrol/Makefile Tue Aug 6 18:10:34 2019 (r350651) +++ head/sbin/nvmecontrol/Makefile Tue Aug 6 18:15:26 2019 (r350652) @@ -5,7 +5,7 @@ PROG= nvmecontrol SRCS= comnd.c nvmecontrol.c SRCS+= devlist.c firmware.c format.c identify.c logpage.c ns.c nsid.c SRCS+= perftest.c power.c reset.c resv.c sanitize.c -#SRCS+= passthru.c +SRCS+= passthru.c SRCS+= identify_ext.c nvme_util.c nc_util.c MAN= nvmecontrol.8 LDFLAGS+= -rdynamic Modified: head/sbin/nvmecontrol/passthru.c ============================================================================== --- head/sbin/nvmecontrol/passthru.c Tue Aug 6 18:10:34 2019 (r350651) +++ head/sbin/nvmecontrol/passthru.c Tue Aug 6 18:15:26 2019 (r350652) @@ -101,7 +101,7 @@ static struct options { */ #define ARG(l, s, t, opt, addr, desc) { l, s, t, &opt.addr, desc } -static const struct opts opts[] = { +static struct opts opts[] = { ARG("opcode", 'o', arg_uint8, opt, opcode, "NVMe command opcode (required)"), ARG("cdw2", '2', arg_uint32, opt, cdw2, @@ -267,7 +267,23 @@ io_passthru(const struct cmd *nf, int argc, char *argv passthru(nf, argc, argv); } -CMD_COMMAND(top, admin-passthru, admin_passthru, sizeof(struct options), opts, args, - "Send a pass through Admin command to the specified device"); -CMD_COMMAND(top, io-passthru, io_passthru, sizeof(struct options), opts, args, - "Send a pass through I/O command to the specified device"); +static struct cmd admin_pass_cmd = { + .name = "admin-passthru", + .fn = admin_passthru, + .ctx_size = sizeof(struct options), + .opts = opts, + .args = args, + .descr = "Send a pass through Admin command to the specified device", +}; + +static struct cmd io_pass_cmd = { + .name = "io-passthru", + .fn = io_passthru, + .ctx_size = sizeof(struct options), + .opts = opts, + .args = args, + .descr = "Send a pass through Admin command to the specified device", +}; + +CMD_COMMAND(admin_pass_cmd); +CMD_COMMAND(io_pass_cmd);