summaryrefslogtreecommitdiffstats
path: root/managemon.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2008-08-19 09:55:15 +0200
committerNeilBrown <neilb@suse.de>2008-08-19 09:55:15 +0200
commit3c558363a1991430e8a9e10c93ee9ee3f8996940 (patch)
treeabdf504295509f53b43d465e93c36b04810c5e7d /managemon.c
parentimsm: allow container assembly in the presence of failed disks (diff)
downloadmdadm-3c558363a1991430e8a9e10c93ee9ee3f8996940.tar.xz
mdadm-3c558363a1991430e8a9e10c93ee9ee3f8996940.zip
Factor out test for subarray version string.
We are about to change the syntax of the version string for 'subarray's. So factor out the test into a single function. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'managemon.c')
-rw-r--r--managemon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/managemon.c b/managemon.c
index 96120077..1c329c58 100644
--- a/managemon.c
+++ b/managemon.c
@@ -492,7 +492,8 @@ void manage(struct mdstat_ent *mdstat, struct supertype *container)
continue;
}
if (mdstat->metadata_version == NULL ||
- strncmp(mdstat->metadata_version, "external:/", 10) != 0 ||
+ strncmp(mdstat->metadata_version, "external:", 9) != 0 ||
+ !is_subarray(mdstat->metadata_version+9) ||
strncmp(mdstat->metadata_version+10, container->devname,
strlen(container->devname)) != 0 ||
mdstat->metadata_version[10+strlen(container->devname)]