summaryrefslogtreecommitdiffstats
path: root/mdadm.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-09-10 01:48:06 +0200
committerNeilBrown <neilb@suse.de>2013-09-10 01:48:06 +0200
commit1c0aebc2bec4d8e7e575c4222600826de3f1b73e (patch)
tree360da02b6e65739a25e539e9e2259ac00642a657 /mdadm.h
parentDDF: handle fake RAIDs with changing subarray UUIDs (diff)
downloadmdadm-1c0aebc2bec4d8e7e575c4222600826de3f1b73e.tar.xz
mdadm-1c0aebc2bec4d8e7e575c4222600826de3f1b73e.zip
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;