Moving the success indicator next to status output to make it easier to read since that is correlated to status and not firmware status output. Also changing the firmware status to hex in order to reflect the spec.
Signed-off-by: Dave Jiang <dave.ji...@intel.com> --- ndctl/lib/libndctl.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c index a165e697..413a7db3 100644 --- a/ndctl/lib/libndctl.c +++ b/ndctl/lib/libndctl.c @@ -2441,11 +2441,11 @@ static int do_cmd(int fd, int ioctl_cmd, struct ndctl_cmd *cmd) if (iter->total_xfer == 0) { rc = ioctl(fd, ioctl_cmd, cmd->cmd_buf); - dbg(ctx, "bus: %d dimm: %#x cmd: %s%s%s status: %d fw: %d (%s)\n", + dbg(ctx, "bus: %d dimm: %#x cmd: %s%s%s status: %d (%s) fw: %#x\n", bus->id, dimm ? ndctl_dimm_get_handle(dimm) : 0, name, sub_name ? ":" : "", sub_name ? sub_name : "", - rc, *(cmd->firmware_status), rc < 0 ? - strerror(errno) : "success"); + rc, rc < 0 ? strerror(errno) : "success", + *(cmd->firmware_status)); if (rc < 0) return -errno; else @@ -2474,12 +2474,12 @@ static int do_cmd(int fd, int ioctl_cmd, struct ndctl_cmd *cmd) } } - dbg(ctx, "bus: %d dimm: %#x cmd: %s%s%s total: %d max_xfer: %d status: %d fw: %d (%s)\n", + dbg(ctx, "bus: %d dimm: %#x cmd: %s%s%s total: %d max_xfer: %d status: %d (%s) fw: %#x\n", bus->id, dimm ? ndctl_dimm_get_handle(dimm) : 0, name, sub_name ? ":" : "", sub_name ? sub_name : "", iter->total_xfer, iter->max_xfer, rc, - *(cmd->firmware_status), - rc < 0 ? strerror(errno) : "success"); + rc < 0 ? strerror(errno) : "success", + *(cmd->firmware_status)); return rc; } _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm