From 822e393a050510b0002bdfb1b0554fa8d7860a99 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Thu, 4 Oct 2012 16:34:20 +1000 Subject: Allow parse_size to return 0. We will shortly introduce --data-offset= which is allowed to be zero. We will want to use parse_size() so it needs to be able to return '0' without it being an error. So define INVALID_SECTORS to be an impossible value (currently '1') and return and test for it consistently. Signed-off-by: NeilBrown --- mdadm.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mdadm.h') diff --git a/mdadm.h b/mdadm.h index 6980bfb8..6db7714a 100644 --- a/mdadm.h +++ b/mdadm.h @@ -1460,4 +1460,10 @@ char *xstrdup(const char *str); * In those cases with use MAX_SIZE */ #define MAX_SIZE 1 + +/* We want to use unsigned numbers for sector counts, but need + * a value for 'invalid'. Use '1'. + */ +#define INVALID_SECTORS 1 + extern int __offroot; -- cgit v1.2.3