]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
blkreport: remove "LBA" from usage() and unnecessary alignment check
authorKarel Zak <kzak@redhat.com>
Fri, 10 Feb 2017 09:53:38 +0000 (10:53 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 10 Feb 2017 09:53:38 +0000 (10:53 +0100)
* "LBA" sounds confusing

* alignment check is unnecessary for report ioctl

Reported-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/blkreport.c

index 13f2adad228f56a8e036fcecde81dd2cbc86126f..f3b8ebbda10adfa0f42eccaf7f8e88afbeebe80f 100644 (file)
@@ -129,7 +129,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
        fputs(_("Report zone information about the given device.\n"), out);
 
        fputs(USAGE_OPTIONS, out);
-       fputs(_(" -z, --zone <offset>    LBA of first zone (in 512-byte sectors)\n"), out);
+       fputs(_(" -z, --zone <offset>    start sector of first zone (in 512-byte sectors)\n"), out);
        fputs(_(" -c, --count <number>   maximum number of zones in the report\n"), out);
        fputs(_(" -v, --verbose          display the number of reported zones"), out);
        fputs(USAGE_SEPARATOR, out);
@@ -217,13 +217,8 @@ int main(int argc, char **argv)
        if (blkdev_get_sector_size(fd, &secsize))
                err(EXIT_FAILURE, _("%s: BLKSSZGET ioctl failed"), path);
 
-       /* check offset alignment to the sector size */
-       if (offset % secsize)
-               errx(EXIT_FAILURE, _("%s: offset %" PRIu64 " is not aligned "
-                        "to sector size %i"), path, offset, secsize);
        if (offset > blksectors)
                errx(EXIT_FAILURE, _("%s: offset is greater than device size"), path);
-
        if (length < 1)
                length = 1;
        if (length > MAX_REPORT_LEN) {