From 035f32ab17e53c632b9b6a34fb6416ae714bf3ab Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Mon, 4 Jul 2011 19:37:11 -0400 Subject: 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" --- misc/tune2fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'misc') 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); -- cgit v1.2.3