]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
mkfs: use cvtnum from libfrog
authorDave Chinner <dchinner@redhat.com>
Tue, 7 Apr 2020 18:29:39 +0000 (14:29 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Tue, 7 Apr 2020 18:29:39 +0000 (14:29 -0400)
commit105041e64ad37953ead5227c88410d88eef910fa
tree307de245aa4307313b001c904351a7e813796996
parent08814ce496f70dace66c201dbdc1f6d2d4ed2f4c
mkfs: use cvtnum from libfrog

Move the checks for zero block/sector size to the libfrog code
and return -1LL as an invalid value instead. Catch the invalid
value in mkfs and error out there instead of inside cvtnum.

Also rename the libfrog block/sector size variables so they don't
shadow the mkfs global variables of the same name and mark the
string being passed in as a const.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/xfs_multidisk.h
libfrog/convert.c
libfrog/convert.h
mkfs/proto.c
mkfs/xfs_mkfs.c