summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2011-07-04 19:37:11 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-07-04 19:37:11 -0400
commit035f32ab17e53c632b9b6a34fb6416ae714bf3ab (patch)
treedc2526a1fa7b717d8103ec0f4db2bf44ce588cb3 /misc
parent177cb5c7e2b59b40570ca76d8dee383fc1ca8934 (diff)
downloade2fsprogs-035f32ab17e53c632b9b6a34fb6416ae714bf3ab.tar.gz
tune2fs: allow setting the stride and stripe width to zero
Tune2fs previously would give an error if the user tried setting the stride and stripe-width parameters to zero; but this is necessary to disable the stride and stripe-width settings. So allow setting these superblock fields to zero. Addresses-Google-Bug: #4988557 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'misc')
-rw-r--r--misc/tune2fs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 7d5c092b..7aacff3a 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -937,7 +937,7 @@ static void parse_extended_opts(ext2_filsys fs, const char *opts)
continue;
}
stride = strtoul(arg, &p, 0);
- if (*p || (stride == 0)) {
+ if (*p) {
fprintf(stderr,
_("Invalid RAID stride: %s\n"),
arg);
@@ -952,7 +952,7 @@ static void parse_extended_opts(ext2_filsys fs, const char *opts)
continue;
}
stripe_width = strtoul(arg, &p, 0);
- if (*p || (stripe_width == 0)) {
+ if (*p) {
fprintf(stderr,
_("Invalid RAID stripe-width: %s\n"),
arg);