summaryrefslogtreecommitdiff
path: root/mdadm.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-09-10 09:48:06 +1000
committerNeilBrown <neilb@suse.de>2013-09-10 09:48:06 +1000
commit1c0aebc2bec4d8e7e575c4222600826de3f1b73e (patch)
tree360da02b6e65739a25e539e9e2259ac00642a657 /mdadm.h
parent7087f02b90ef7b5817193d385b8d83148565bff9 (diff)
Move ARRAY_SIZE macro to common include file.
That was super-ddf can use it. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.h')
-rw-r--r--mdadm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/mdadm.h b/mdadm.h
index 91d27139..2eca6032 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -178,6 +178,8 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
(void) (&_max1 == &_max2); \
_max1 > _max2 ? _max1 : _max2; })
+#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
+
/* general information that might be extracted from a superblock */
struct mdinfo {
mdu_array_info_t array;