mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 00:33:30 +00:00
nvmecontrol: Report status from passthru commands
Report status from dword0 for passthru commands. Many commands report
some status or information here, so reporting it can help know what's
going on.
Sponsored by: Netflix
(cherry picked from commit 510a3da147
)
This commit is contained in:
parent
bf7ea64d79
commit
abb811c40c
@ -246,7 +246,8 @@ passthru(const struct cmd *f, int argc, char *argv[])
|
||||
errno = 0;
|
||||
if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0)
|
||||
err(EX_IOERR, "passthrough request failed");
|
||||
/* XXX report status */
|
||||
if (!opt.binary)
|
||||
printf("DWORD0 status= %#x\n", pt.cpl.cdw0);
|
||||
if (opt.read) {
|
||||
if (opt.binary)
|
||||
write(STDOUT_FILENO, data, opt.data_len);
|
||||
|
Loading…
Reference in New Issue
Block a user