]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
blockdev: add missing verbose output for --getsz
authorChristoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Tue, 12 Dec 2023 16:23:09 +0000 (17:23 +0100)
committerChristoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Tue, 12 Dec 2023 16:23:09 +0000 (17:23 +0100)
Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
disk-utils/blockdev.c

index 92c02602b7a9986e3e096aec46690db27dbdec5f..242d11638a712e973da39d808f1781f28c9c014e 100644 (file)
@@ -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"));