From: Karel Zak Date: Fri, 10 Feb 2017 09:53:38 +0000 (+0100) Subject: blkreport: remove "LBA" from usage() and unnecessary alignment check X-Git-Tag: v2.30-rc1~263 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e30dc82d83b42a738df10b9f1e7d6b1bbcab0af;p=thirdparty%2Futil-linux.git blkreport: remove "LBA" from usage() and unnecessary alignment check * "LBA" sounds confusing * alignment check is unnecessary for report ioctl Reported-by: Damien Le Moal Signed-off-by: Karel Zak --- diff --git a/sys-utils/blkreport.c b/sys-utils/blkreport.c index 13f2adad22..f3b8ebbda1 100644 --- a/sys-utils/blkreport.c +++ b/sys-utils/blkreport.c @@ -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 LBA of first zone (in 512-byte sectors)\n"), out); + fputs(_(" -z, --zone start sector of first zone (in 512-byte sectors)\n"), out); fputs(_(" -c, --count 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) {