[PATCH 03/34] FIX: Position calculation in mdstat_by_subdev

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

 



From: Krzysztof Wojcik <krzysztof.wojcik@xxxxxxxxx>

Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@xxxxxxxxx>
---

 mdstat.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mdstat.c b/mdstat.c
index bac3742..3d2edad 100644
--- a/mdstat.c
+++ b/mdstat.c
@@ -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
 			) {

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