diff options
author | Dan Williams <dan.j.williams@intel.com> | 2008-09-24 05:58:02 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2008-10-15 14:15:51 -0700 |
commit | 2a24d7b6964546a83409cc1300615b046767d013 (patch) | |
tree | 53b94b40a6f54654dad5c8537d43485132d46486 /mdadm.h | |
parent | c92a2527e1f36ae8e3e83e0d7ca3ed5d269906ef (diff) | |
download | mdadm-2a24d7b6964546a83409cc1300615b046767d013.tar.gz mdadm-2a24d7b6964546a83409cc1300615b046767d013.tar.xz mdadm-2a24d7b6964546a83409cc1300615b046767d013.zip |
sysfs: dprintf when we fail to write a sysfs file
When arrays do not startup correctly it would be nice to know why. Need
to move the dprintf definition to mdadm.h
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'mdadm.h')
-rw-r--r-- | mdadm.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -844,6 +844,14 @@ static inline int is_subarray(char *vers) return (*vers == '/' || *vers == '-'); } +#ifdef DEBUG +#define dprintf(fmt, arg...) \ + fprintf(stderr, fmt, ##arg) +#else +#define dprintf(fmt, arg...) \ + ({ if (0) fprintf(stderr, fmt, ##arg); 0; }) +#endif + #define LEVEL_MULTIPATH (-4) #define LEVEL_LINEAR (-1) #define LEVEL_FAULTY (-5) |