diff options
author | Krzysztof Wojcik <krzysztof.wojcik@intel.com> | 2011-01-06 06:07:20 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-01-06 06:07:20 +0100 |
commit | f6f53092ffb0eea4bd1716cc38ce785b94748e8d (patch) | |
tree | 37b7fe28bd82989645d07397136159485f8844ab /mdstat.c | |
parent | Refactor reshape monitoring. (diff) | |
download | mdadm-f6f53092ffb0eea4bd1716cc38ce785b94748e8d.tar.xz mdadm-f6f53092ffb0eea4bd1716cc38ce785b94748e8d.zip |
FIX: Position calculation in mdstat_by_subdev
Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdstat.c')
-rw-r--r-- | mdstat.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -399,9 +399,9 @@ struct mdstat_ent *mdstat_by_subdev(char *subdev, int container) strncmp(mdstat->metadata_version, "external:", 9) == 0 && strchr("/-", mdstat->metadata_version[9]) != NULL && strncmp(mdstat->metadata_version+10, "md", 2) == 0 && - strtoul(mdstat->metadata_version+11, &pos, 10) + strtoul(mdstat->metadata_version+12, &pos, 10) == (unsigned)container && - pos > mdstat->metadata_version+11 && + pos > mdstat->metadata_version+12 && *pos == '/' && strcmp(pos+1, subdev) == 0 ) { |