]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdadm.h
Change way of printing name of a process
[thirdparty/mdadm.git] / mdadm.h
diff --git a/mdadm.h b/mdadm.h
index 02a9288d86b8b1d334ad1aa0560afe7f64d5baba..c8d079cfe0ead43d5dfe27464b32d8e78a6ea385 100644 (file)
--- a/mdadm.h
+++ b/mdadm.h
@@ -180,6 +180,8 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
 
 #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
 
+extern const char Name[];
+
 /* general information that might be extracted from a superblock */
 struct mdinfo {
        mdu_array_info_t        array;
@@ -258,11 +260,10 @@ struct createinfo {
        int     mode;
        int     symlinks;
        int     names;
+       int     bblist;
        struct supertype *supertype;
 };
 
-#define Name "mdadm"
-
 enum mode {
        ASSEMBLE=1,
        BUILD,
@@ -1282,6 +1283,7 @@ extern int check_partitions(int fd, char *dname,
                            unsigned long long size);
 
 extern int get_mdp_major(void);
+extern int get_maj_min(char *dev, int *major, int *minor);
 extern int dev_open(char *dev, int flags);
 extern int open_dev(char *devnm);
 extern void reopen_mddev(int mdfd);
@@ -1455,7 +1457,7 @@ static inline int xasprintf(char **strp, const char *fmt, ...) {
        return ret;
 }
 
-#define pr_err(fmt ...) fprintf(stderr, Name ": " fmt)
+#define pr_err(fmt, args...) fprintf(stderr, "%s: "fmt, Name, ##args)
 #define cont_err(fmt ...) fprintf(stderr, "       " fmt)
 
 void *xmalloc(size_t len);