On Thu, Apr 25, 2024 at 06:44:00AM -0400, Brian Foster wrote: > The internal tag string doesn't contain a newline. Append one when > emitting the tag via sysfs. > > Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx> > --- > > 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? In my initial patch I had added a newline char. Then someone gave examples where sysfs output did not have newline char. So I got rid of it. After that Stefan posted a new patch series that did not include newline. So yes it was intentional. I am sitting on the fence on this one. Don't have a strong preference either way. Others might have good arguments one way or the other. Thanks Vivek > > 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 >