diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2024-04-12 06:54:19 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2024-05-02 23:48:09 +0200 |
commit | 3f9b8fb46e5d20eac314f56747e24e1a4e74539d (patch) | |
tree | bd24e449d106c15ebb750ba34abfbeecd83c0ff8 /lib | |
parent | Linux 6.9-rc2 (diff) | |
download | linux-3f9b8fb46e5d20eac314f56747e24e1a4e74539d.tar.xz linux-3f9b8fb46e5d20eac314f56747e24e1a4e74539d.zip |
Use bdev_is_paritition() instead of open-coding it
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vsprintf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 552738f14275..3f9f1b959ef0 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -966,7 +966,7 @@ char *bdev_name(char *buf, char *end, struct block_device *bdev, hd = bdev->bd_disk; buf = string(buf, end, hd->disk_name, spec); - if (bdev->bd_partno) { + if (bdev_is_partition(bdev)) { if (isdigit(hd->disk_name[strlen(hd->disk_name)-1])) { if (buf < end) *buf = 'p'; |