]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
mkfs: fix parsing of value-less -d/-l concurrency cli option
authorDarrick J. Wong <djwong@kernel.org>
Thu, 16 Jan 2025 21:22:04 +0000 (13:22 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 16 Jan 2025 21:27:27 +0000 (13:27 -0800)
commit93711a36ed549ac902ab9d9fbb87846abeb95763
tree8137d4ec12b2cbd19e305aa7f34b230f599ff69d
parentc414a08700c550b1d4071e2d19325f004df4a5da
mkfs: fix parsing of value-less -d/-l concurrency cli option

It's supposed to be possible to specify the -d concurrency option with
no value in order to get mkfs calculate the agcount from the number of
CPUs.  Unfortunately I forgot to handle that case (optarg is null) so
mkfs crashes instead.  Fix that.

Fixes: 9338bc8b1bf073 ("mkfs: allow sizing allocation groups for concurrency")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
mkfs/xfs_mkfs.c