From: NeilBrown Date: Mon, 10 Mar 2008 18:43:47 +0000 (-0700) Subject: md: fix formatting error in /proc/mdstat X-Git-Tag: v2.6.25-rc6~66 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52720ae77d392d3f4c12281c37304edbc8cb51f1;p=linux-2.6 md: fix formatting error in /proc/mdstat If an md array is "auto-read-only", then this appears in /proc/mdstat as /dev/md0: active(auto-read-only) whereas if it is truely readonly, it appears as /dev/md0: active (read-only) The difference being a space. One program known to parse this file expects the space and gets badly confused. It will be fixed, but it would be best if what the kernel generates is more consistent too. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 827824a9f3..ccbbf63727 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -5149,7 +5149,7 @@ static int md_seq_show(struct seq_file *seq, void *v) if (mddev->ro==1) seq_printf(seq, " (read-only)"); if (mddev->ro==2) - seq_printf(seq, "(auto-read-only)"); + seq_printf(seq, " (auto-read-only)"); seq_printf(seq, " %s", mddev->pers->name); }