From: Brian Foster <bfoster@redhat.com>
To: linux-fsdevel@vger.kernel.org
Cc: Miklos Szeredi <mszeredi@redhat.com>,
vgoyal@redhat.com, Stefan Hajnoczi <stefanha@redhat.com>
Subject: [PATCH] virtiofs: include a newline in sysfs tag
Date: Thu, 25 Apr 2024 06:44:00 -0400 [thread overview]
Message-ID: <20240425104400.30222-1-bfoster@redhat.com> (raw)
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
next reply other threads:[~2024-04-25 10:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-25 10:44 Brian Foster [this message]
2024-04-25 12:42 ` [PATCH] virtiofs: include a newline in sysfs tag 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240425104400.30222-1-bfoster@redhat.com \
--to=bfoster@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mszeredi@redhat.com \
--cc=stefanha@redhat.com \
--cc=vgoyal@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).