summaryrefslogtreecommitdiff
path: root/mdadm.h
diff options
context:
space:
mode:
authorLukasz Dorau <lukasz.dorau@intel.com>2012-09-14 16:12:45 +0200
committerNeilBrown <neilb@suse.de>2012-09-20 12:27:17 +1000
commit51d4261ca9fa5f1e6b09ff1e6891ae762ee60a57 (patch)
tree2362df500201b978de0cc23b58280a1758bb63eb /mdadm.h
parentd5d2c614739a2370e295d9e83594b9c52a11b887 (diff)
fix: adjust parse_size() to the unsigned size variable
An error in parse_size() should be reported by 0, not -1, because -1 is changed to the max value of unsigned long long during calculations of size (e.g. at mdadm.c:412). A negative value of size should be reported as error (e.g. size equal -1 has been changed to the max value of unsigned long long so far). Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.h')
-rw-r--r--mdadm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/mdadm.h b/mdadm.h
index 9feccc60..f202ffa6 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -1156,7 +1156,7 @@ extern unsigned long bitmap_sectors(struct bitmap_super_s *bsb);
extern int md_get_version(int fd);
extern int get_linux_version(void);
extern int mdadm_version(char *version);
-extern long long parse_size(char *size);
+extern unsigned long long parse_size(char *size);
extern int parse_uuid(char *str, int uuid[4]);
extern int parse_layout_10(char *layout);
extern int parse_layout_faulty(char *layout);