From: Theodore Ts'o Date: Mon, 4 Jul 2011 23:37:11 +0000 (-0400) Subject: tune2fs: allow setting the stride and stripe width to zero X-Git-Tag: v1.42-WIP-0916~9^2~7 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=035f32ab17e53c632b9b6a34fb6416ae714bf3ab;p=tools%2Fe2fsprogs.git 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" --- diff --git a/misc/tune2fs.c b/misc/tune2fs.c index 7d5c092..7aacff3 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);