Skip to contentSkip to conversation

nvmet: Improve device_path output

PATCH New Ian Bakshan 2 participants 2 messages Nov 23, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvmet: Improve device_path output

Add '\n' when printing device path.

Signed-off-by Ian Bakshan <ianb at mellanox.com>
Reviewed-by Sagi Grimberg <sagig at mellanox.com>
---
 drivers/nvme/target/configfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/target/configfs.c +1 -1
index 3a108b9..8b9b170 100644
@@ -23,7 +23,7 @@ CONFIGFS_ATTR_OPS(nvmet_ns);
 
 static ssize_t nvmet_ns_device_path_show(struct nvmet_ns *ns, char *page)
 {
-	return sprintf(page, "%s", ns->device_path);
+	return sprintf(page, "%s\n", ns->device_path);
 }
 
 static ssize_t nvmet_ns_device_path_store(struct nvmet_ns *ns, const char *page,
Signature · 1 line
1.8.4.3
#1 lore raw

PATCH 1/1 nvmet: Improve device_path output

Quoted 4 lines · Ian Bakshan

Add '\n' when printing device path.

Signed-off-by Ian Bakshan <ianb at mellanox.com>
Reviewed-by Sagi Grimberg <sagig at mellanox.com>

Thanks, this looks sensibe. Note that it can't currently handle a newline at the input side either, they might be even more useful to fix.