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.
This commit is contained in:
Warner Losh 2019-08-06 18:15:26 +00:00
parent 9454b4fd78
commit ef7a2ead30
2 changed files with 22 additions and 6 deletions

View File

@ -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

View File

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