]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dm: sysfs: use sysfs_emit() in dm-sysfs.c
authorVivek BalachandharTN <vivek.balachandhar@gmail.com>
Wed, 15 Oct 2025 07:45:02 +0000 (07:45 +0000)
committerMikulas Patocka <mpatocka@redhat.com>
Mon, 20 Oct 2025 13:22:21 +0000 (15:22 +0200)
commit4929ba5c5bd75dc28971f0909902e4624e92ad59
tree3358c86f647ee77aec800518b116266cf3784592
parent27cecacbe88f22aa2e0454cc516d64a55e9002d4
dm: sysfs: use sysfs_emit() in dm-sysfs.c

Replace sprintf()+strlen() with sysfs_emit(), the preferred helper for
sysfs show() routines. sysfs_emit() returns the number of bytes written,
guarantees NUL-termination, and clamps to PAGE_SIZE-1.

Reference: Documentation/filesystems/sysfs.rst.

No functional change intended.

Signed-off-by: Vivek BalachandharTN <vivek.balachandhar@gmail.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-sysfs.c