Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Aug 2019 19:44:58 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
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
Message-ID:  <201908121944.x7CJiwKj096622@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908121944.x7CJiwKj096622>