diff --git a/sys/cam/nvme/nvme_all.h b/sys/cam/nvme/nvme_all.h --- a/sys/cam/nvme/nvme_all.h +++ b/sys/cam/nvme/nvme_all.h @@ -42,6 +42,8 @@ struct sbuf; void nvme_print_ident(const struct nvme_controller_data *, const struct nvme_namespace_data *, struct sbuf *); +void nvme_print_ident_short(const struct nvme_controller_data *, + const struct nvme_namespace_data *, struct sbuf *); const char *nvme_op_string(const struct nvme_command *, int admin); const char *nvme_cmd_string(const struct nvme_command *, char *, size_t); void nvme_cmd_sbuf(const struct nvme_command *, struct sbuf *sb); diff --git a/sys/cam/nvme/nvme_all.c b/sys/cam/nvme/nvme_all.c --- a/sys/cam/nvme/nvme_all.c +++ b/sys/cam/nvme/nvme_all.c @@ -89,7 +89,14 @@ nvme_print_ident(const struct nvme_controller_data *cdata, const struct nvme_namespace_data *data, struct sbuf *sb) { + nvme_print_ident_short(cdata, data, sb); + sbuf_printf(sb, "\n"); +} +void +nvme_print_ident_short(const struct nvme_controller_data *cdata, + const struct nvme_namespace_data *data, struct sbuf *sb) +{ sbuf_printf(sb, "<"); cam_strvis_sbuf(sb, cdata->mn, sizeof(cdata->mn), CAM_STRVIS_FLAG_NONASCII_SPC); @@ -99,7 +106,7 @@ sbuf_printf(sb, " "); cam_strvis_sbuf(sb, cdata->sn, sizeof(cdata->sn), CAM_STRVIS_FLAG_NONASCII_SPC); - sbuf_printf(sb, ">\n"); + sbuf_printf(sb, ">"); } /* XXX need to do nvme admin opcodes too, but those aren't used yet by nda */ diff --git a/sys/cam/nvme/nvme_xpt.c b/sys/cam/nvme/nvme_xpt.c --- a/sys/cam/nvme/nvme_xpt.c +++ b/sys/cam/nvme/nvme_xpt.c @@ -839,8 +839,13 @@ static void nvme_proto_denounce(struct cam_ed *device) { + struct sbuf sb; + char buffer[120]; - nvme_proto_announce(device); + sbuf_new(&sb, buffer, sizeof(buffer), SBUF_FIXEDLEN); + nvme_print_ident_short(device->nvme_cdata, device->nvme_data, &sb); + sbuf_finish(&sb); + sbuf_putbuf(&sb); } static void