svn commit: r350652 - head/sbin/nvmecontrol

Warner Losh imp at FreeBSD.org
Tue Aug 6 18:15:27 UTC 2019


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);


More information about the svn-src-all mailing list