From owner-svn-src-all@freebsd.org Mon Aug 12 19:44:58 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 9DFF1BF5A2; Mon, 12 Aug 2019 19:44:58 +0000 (UTC) (envelope-from mav@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 466mXB3L4jz3PFP; Mon, 12 Aug 2019 19:44:58 +0000 (UTC) (envelope-from mav@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 54B873B9B; Mon, 12 Aug 2019 19:44:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x7CJiwbY096623; Mon, 12 Aug 2019 19:44:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x7CJiwKj096622; Mon, 12 Aug 2019 19:44:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201908121944.x7CJiwKj096622@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 12 Aug 2019 19:44:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r350954 - stable/12/sbin/nvmecontrol X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/sbin/nvmecontrol X-SVN-Commit-Revision: 350954 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: Mon, 12 Aug 2019 19:44:58 -0000 Author: mav Date: Mon Aug 12 19:44:57 2019 New Revision: 350954 URL: https://svnweb.freebsd.org/changeset/base/350954 Log: MFC r350652 (by imp): 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: stable/12/sbin/nvmecontrol/Makefile stable/12/sbin/nvmecontrol/passthru.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sbin/nvmecontrol/Makefile ============================================================================== --- stable/12/sbin/nvmecontrol/Makefile Mon Aug 12 19:44:57 2019 (r350953) +++ stable/12/sbin/nvmecontrol/Makefile Mon Aug 12 19:44:57 2019 (r350954) @@ -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: stable/12/sbin/nvmecontrol/passthru.c ============================================================================== --- stable/12/sbin/nvmecontrol/passthru.c Mon Aug 12 19:44:57 2019 (r350953) +++ stable/12/sbin/nvmecontrol/passthru.c Mon Aug 12 19:44:57 2019 (r350954) @@ -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);