]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blobdiff - mkfs/xfs_mkfs.c
mkfs.xfs: if either sunit or swidth is nonzero, the other must be as well
[thirdparty/xfsprogs-dev.git] / mkfs / xfs_mkfs.c
index 2de0171308317fd4de0a880b294ce58fc5be3df3..a135e06e72155dd4428dbf8dc9d9fc50d3f67be7 100644 (file)
@@ -2271,7 +2271,8 @@ _("data stripe width (%lld) is too large of a multiple of the data stripe unit (
                dswidth = big_dswidth;
        }
 
-       if (dsunit && (!dswidth || (dswidth % dsunit != 0))) {
+       if ((dsunit && !dswidth) || (!dsunit && dswidth) ||
+           (dsunit && (dswidth % dsunit != 0))) {
                fprintf(stderr,
 _("data stripe width (%d) must be a multiple of the data stripe unit (%d)\n"),
                        dswidth, dsunit);