summaryrefslogtreecommitdiffstats
path: root/mdadm.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-01-08 09:31:28 +1100
committerNeilBrown <neilb@suse.de>2009-01-08 09:31:28 +1100
commit78fbcc10312649f2f4f88283e3f19dce9b205733 (patch)
treedb2596ad62db5b86e1e08a693eb4b5dad2b57d30 /mdadm.h
parent45b662b611a6fbbdd018a65b6f205e91df884c37 (diff)
parent1a0ee0baf049809f9e67d60bb8158801eada3bd5 (diff)
downloadmdadm-78fbcc10312649f2f4f88283e3f19dce9b205733.tar.gz
mdadm-78fbcc10312649f2f4f88283e3f19dce9b205733.tar.xz
mdadm-78fbcc10312649f2f4f88283e3f19dce9b205733.zip
Merge branch 'master' into scratch-3.0
Conflicts: Assemble.c config.c
Diffstat (limited to 'mdadm.h')
-rw-r--r--mdadm.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/mdadm.h b/mdadm.h
index e75648b..8220535 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -880,6 +880,17 @@ static inline int is_subarray(char *vers)
#define dprintf(fmt, arg...) \
({ if (0) fprintf(stderr, fmt, ##arg); 0; })
#endif
+#include <assert.h>
+#include <stdarg.h>
+static inline int xasprintf(char **strp, const char *fmt, ...) {
+ va_list ap;
+ int ret;
+ va_start(ap, fmt);
+ ret = asprintf(strp, fmt, ap);
+ va_end(ap);
+ assert(ret >= 0);
+ return ret;
+}
#define LEVEL_MULTIPATH (-4)
#define LEVEL_LINEAR (-1)