diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2024-04-12 00:54:19 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2024-05-02 17:48:09 -0400 |
commit | 3f9b8fb46e5d20eac314f56747e24e1a4e74539d (patch) | |
tree | bd24e449d106c15ebb750ba34abfbeecd83c0ff8 /lib/vsprintf.c | |
parent | 39cd87c4eb2b893354f3b850f916353f2658ae6f (diff) |
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/vsprintf.c')
-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'; |