]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - sysfs.c
Bitmap_offset is a signed number
[thirdparty/mdadm.git] / sysfs.c
diff --git a/sysfs.c b/sysfs.c
index cddabaee8b6d17dbfab3deb92fe2687edb4cb4b8..a1007cf276658f0f158a71c4e33657432f3ca07e 100644 (file)
--- 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;
        }