cam/nvme: Remove spurious newline during periph detach announcement
Other protocol denounce routines use a "short" variant of announce that does not include a trailing newline. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D41176
This commit is contained in:
@@ -89,7 +89,14 @@ void
|
||||
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 @@ nvme_print_ident(const struct nvme_controller_data *cdata,
|
||||
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 */
|
||||
|
||||
@@ -42,6 +42,8 @@ int nvme_identify_match(caddr_t identbuffer, caddr_t table_entry);
|
||||
|
||||
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);
|
||||
|
||||
@@ -838,8 +838,13 @@ nvme_proto_announce(struct cam_ed *device)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user