Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102644919
D41176.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D41176.diff
View Options
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
@@ -838,8 +838,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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 6:48 AM (21 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14654755
Default Alt Text
D41176.diff (1 KB)
Attached To
Mode
D41176: cam/nvme: Remove spurious newline during periph detach announcement
Attached
Detach File
Event Timeline
Log In to Comment