From: Christoph Anton Mitterer Date: Tue, 12 Dec 2023 16:23:09 +0000 (+0100) Subject: blockdev: add missing verbose output for --getsz X-Git-Tag: v2.40-rc1~102^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d546d7516d481a9bcff3e2db852ef1b999825ece;p=thirdparty%2Futil-linux.git blockdev: add missing verbose output for --getsz Signed-off-by: Christoph Anton Mitterer --- diff --git a/disk-utils/blockdev.c b/disk-utils/blockdev.c index 92c02602b7..242d11638a 100644 --- a/disk-utils/blockdev.c +++ b/disk-utils/blockdev.c @@ -347,8 +347,11 @@ static void do_commands(int fd, char **argv, int d) if (!strcmp(argv[i], "--getsz")) { res = blkdev_get_sectors(fd, &llu); - if (res == 0) + if (res == 0) { + if (verbose) + printf(_("get size in 512-byte sectors: ")); printf("%lld\n", llu); + } else errx(EXIT_FAILURE, _("could not get device size"));