summaryrefslogtreecommitdiff
path: root/sysfs.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2012-04-04 14:00:42 +1000
committerNeilBrown <neilb@suse.de>2012-04-04 14:03:45 +1000
commitfbdef49811c9e2b54e2064d9af68cfffa77c6e77 (patch)
tree15dde5a1335015a70397be8041e5c7028489bcf8 /sysfs.c
parent15632a96f4e6919b4fa54c622e9e14d7fdae42d1 (diff)
Bitmap_offset is a signed number
As the bitmap can be before the superblock, bitmap_offset is signed. But some of the code didn't honour that :-( Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'sysfs.c')
-rw-r--r--sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysfs.c b/sysfs.c
index cddabaee..a1007cf2 100644
--- a/sysfs.c
+++ b/sysfs.c
@@ -226,7 +226,7 @@ struct mdinfo *sysfs_read(int fd, int devnum, unsigned long options)
else if (strncmp(buf, "none", 4) == 0)
sra->bitmap_offset = 0;
else if (buf[0] == '+')
- sra->bitmap_offset = strtoul(buf+1, NULL, 10);
+ sra->bitmap_offset = strtol(buf+1, NULL, 10);
else
goto abort;
}