]> git.ipfire.org Git - thirdparty/linux.git/commit
block: use sysfs_emit in sysfs show functions
authorThorsten Blum <thorsten.blum@linux.dev>
Thu, 2 Apr 2026 16:50:00 +0000 (18:50 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 3 Apr 2026 11:07:46 +0000 (05:07 -0600)
commita175ee8273319547a4be7584da03831a2fb2f835
tree2c81fde623c6350745d30bc205dd257c6599d25a
parent4e56428ed4782e9e1356875af8e714b24c5a8783
block: use sysfs_emit in sysfs show functions

Replace sprintf() with sysfs_emit() in sysfs show functions.
sysfs_emit() is preferred for formatting sysfs output because it
provides safer bounds checking.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://patch.msgid.link/20260402164958.894879-4-thorsten.blum@linux.dev
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/partitions/core.c