mdadm/mdstat: correct the strncmp number 4 as 6

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

Signed-off-by: Zhilong Liu <zlliu@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
This commit is contained in:
Zhilong Liu 2017-10-09 16:21:14 +08:00 committed by Jes Sorensen
parent a9db89956e
commit 35c34037b5
1 changed files with 1 additions and 1 deletions

View File

@ -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;