linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] virtiofs: include a newline in sysfs tag
@ 2024-04-25 10:44 Brian Foster
  2024-04-25 12:42 ` Vivek Goyal
  2024-04-30 17:34 ` Stefan Hajnoczi
  0 siblings, 2 replies; 7+ messages in thread
From: Brian Foster @ 2024-04-25 10:44 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Miklos Szeredi, vgoyal, Stefan Hajnoczi

The internal tag string doesn't contain a newline. Append one when
emitting the tag via sysfs.

Signed-off-by: Brian Foster <bfoster@redhat.com>
---

Hi all,

I just noticed this and it seemed a little odd to me compared to typical
sysfs output, but maybe it was intentional..? Easy enough to send a
patch either way.. thoughts?

Brian

 fs/fuse/virtio_fs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fuse/virtio_fs.c b/fs/fuse/virtio_fs.c
index 322af827a232..bb3e941b9503 100644
--- a/fs/fuse/virtio_fs.c
+++ b/fs/fuse/virtio_fs.c
@@ -170,7 +170,7 @@ static ssize_t tag_show(struct kobject *kobj,
 {
 	struct virtio_fs *fs = container_of(kobj, struct virtio_fs, kobj);
 
-	return sysfs_emit(buf, fs->tag);
+	return sysfs_emit(buf, "%s\n", fs->tag);
 }
 
 static struct kobj_attribute virtio_fs_tag_attr = __ATTR_RO(tag);
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-05-08  7:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-25 10:44 [PATCH] virtiofs: include a newline in sysfs tag Brian Foster
2024-04-25 12:42 ` Vivek Goyal
2024-04-30 17:34 ` Stefan Hajnoczi
2024-05-06 18:57   ` Brian Foster
2024-05-07 14:03     ` Stefan Hajnoczi
2024-05-07 16:32       ` Brian Foster
2024-05-08  7:55       ` Miklos Szeredi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).