]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdadm.c
Consistently print program Name and __func__ in debug messages.
[thirdparty/mdadm.git] / mdadm.c
diff --git a/mdadm.c b/mdadm.c
index c856fcd6335020c00d0edad82616d7109378aa55..fd64e0e31610f18c1a94822dc6dd2911f872b26d 100644 (file)
--- a/mdadm.c
+++ b/mdadm.c
@@ -38,6 +38,7 @@ static int misc_list(struct mddev_dev *devlist,
                     struct mddev_ident *ident,
                     char *dump_directory,
                     struct supertype *ss, struct context *c);
+const char Name[] = "mdadm";
 
 int main(int argc, char *argv[])
 {
@@ -771,12 +772,12 @@ int main(int argc, char *argv[])
                        if (strcmp(c.update,"?") == 0 ||
                            strcmp(c.update, "help") == 0) {
                                outf = stdout;
-                               fprintf(outf, Name ": ");
+                               fprintf(outf, "%s: ", Name);
                        } else {
                                outf = stderr;
                                fprintf(outf,
-                                       Name ": '--update=%s' is invalid.  ",
-                                       c.update);
+                                       "%s: '--update=%s' is invalid.  ",
+                                       Name, c.update);
                        }
                        fprintf(outf, "Valid --update options are:\n"
                "     'sparc2.2', 'super-minor', 'uuid', 'name', 'resync',\n"
@@ -1616,9 +1617,7 @@ static int scan_assemble(struct supertype *ss,
                        a->autof = c->autof;
        }
        if (map_lock(&map))
-               pr_err("%s: failed to get "
-                      "exclusive lock on mapfile\n",
-                      __func__);
+               pr_err("failed to get exclusive lock on mapfile\n");
        do {
                failures = 0;
                successes = 0;