[PATCH 3/3] mdadm/mdstat: correct the strncmp number 4 as 6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



mdstat: it should be corrected as 6 when strncmp 'resync'.

Signed-off-by: Zhilong Liu <zlliu@xxxxxxxx>
---
 mdstat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mdstat.c b/mdstat.c
index 6c906a7..7e600d0 100644
--- a/mdstat.c
+++ b/mdstat.c
@@ -244,7 +244,7 @@ struct mdstat_ent *mdstat_read(int hold, int start)
 					ent->resync = 0;
 			} else if (ent->percent == RESYNC_NONE &&
 				   (w[0] == 'r' || w[0] == 'c')) {
-				if (strncmp(w, "resync", 4) == 0)
+				if (strncmp(w, "resync", 6) == 0)
 					ent->resync = 1;
 				if (strncmp(w, "reshape", 7) == 0)
 					ent->resync = 2;
-- 
2.6.6

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux