diff options
author | Theodore Ts'o <tytso@mit.edu> | 2011-07-04 20:22:19 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2011-07-04 20:43:39 -0400 |
commit | 5b734a0e715ba6590624247b0866e4791f717981 (patch) | |
tree | 5eae444e3886f57d52fd1848ad59230ec02e69b5 /misc/mke2fs.c | |
parent | 9a976ac732a7e9c3d9bf7ccb18190b93b588cb6d (diff) | |
download | e2fsprogs-5b734a0e715ba6590624247b0866e4791f717981.tar.gz |
mke2fs: allow setting the stride and stripe width to zero
Mke2fs previously would give an error if the user tried setting the
stride and stripe-width parameters to zero; but this is necessary to
override the stride and stripe-width settings which get automatically
set from the block device's geometry information in sysfs. So allow
setting these parameters to zero.
Addresses-Google-Bug: #4988555
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'misc/mke2fs.c')
-rw-r--r-- | misc/mke2fs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/mke2fs.c b/misc/mke2fs.c index e28828ee..93ae4bcc 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -731,7 +731,7 @@ static void parse_extended_opts(struct ext2_super_block *param, continue; } param->s_raid_stride = strtoul(arg, &p, 0); - if (*p || (param->s_raid_stride == 0)) { + if (*p) { fprintf(stderr, _("Invalid stride parameter: %s\n"), arg); @@ -746,7 +746,7 @@ static void parse_extended_opts(struct ext2_super_block *param, continue; } param->s_raid_stripe_width = strtoul(arg, &p, 0); - if (*p || (param->s_raid_stripe_width == 0)) { + if (*p) { fprintf(stderr, _("Invalid stripe-width parameter: %s\n"), arg); |