]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdadm.h
non-trivial warn_unused_result fixes, activate_spare
[thirdparty/mdadm.git] / mdadm.h
diff --git a/mdadm.h b/mdadm.h
index 7c73b6ac2cf07004236b3e2145facdeb7dc5df03..7a39187e28cacd3b1018f88d3ac454831e805e99 100644 (file)
--- a/mdadm.h
+++ b/mdadm.h
@@ -259,6 +259,12 @@ typedef struct mddev_ident_s {
        char    *bitmap_file;
        int     bitmap_fd;
 
+       char    *container;     /* /dev/whatever name of container.  You
+                                * would expect this to be the 'devname'
+                                * of some other entry.
+                                */
+       char    *member;        /* subarray within a container */
+
        struct mddev_ident_s *next;
 } *mddev_ident_t;
 
@@ -763,6 +769,8 @@ extern int match_oneof(char *devices, char *devname);
 extern void uuid_from_super(int uuid[4], mdp_super_t *super);
 extern int same_uuid(int a[4], int b[4], int swapuuid);
 extern void copy_uuid(void *a, int b[4], int swapuuid);
+extern char *fname_from_uuid(struct supertype *st,
+                            struct mdinfo *info, char *buf, char sep);
 extern unsigned long calc_csum(void *super, int bytes);
 extern int enough(int level, int raid_disks, int layout, int clean,
                   char *avail, int avail_disks);
@@ -836,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)