]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Change some fprintf(stderrs to cont_err()
authorNeilBrown <neilb@suse.de>
Tue, 21 May 2013 02:51:33 +0000 (12:51 +1000)
committerNeilBrown <neilb@suse.de>
Tue, 21 May 2013 02:51:33 +0000 (12:51 +1000)
Signed-off-by: NeilBrown <neilb@suse.de>
Grow.c
Manage.c
mdadm.c
super-intel.c
util.c

diff --git a/Grow.c b/Grow.c
index 79922c4561e5b0467bdb4cfcf185d846dd74df43..5ee97ca29105e41c24415ae9c0ff8eb673d06801 100644 (file)
--- a/Grow.c
+++ b/Grow.c
@@ -2380,13 +2380,12 @@ static int raid10_reshape(char *container, int fd, char *devname,
                err = errno;
        if (err) {
                pr_err("Cannot set array shape for %s\n",
-                       devname);
-                       if (err == EBUSY &&
-                           (info->array.state & (1<<MD_SB_BITMAP_PRESENT)))
-                               fprintf(stderr,
-                                       "       Bitmap must be removed before"
-                                       " shape can be changed\n");
-                       goto release;
+                      devname);
+               if (err == EBUSY &&
+                   (info->array.state & (1<<MD_SB_BITMAP_PRESENT)))
+                       cont_err("       Bitmap must be removed before"
+                                " shape can be changed\n");
+               goto release;
        }
        sysfs_free(sra);
        return 0;
index b4d73e8902e6f397ce030352ff0d7d181799f47b..2746149aa75d4640130f2ac70b8771cec47a74a3 100644 (file)
--- a/Manage.c
+++ b/Manage.c
@@ -342,7 +342,7 @@ int Manage_runstop(char *devname, int fd, int runstop,
                                pr_err("failed to stop array %s: %s\n",
                                       devname, strerror(errno));
                                if (errno == EBUSY)
-                                       fprintf(stderr, "Perhaps a running "
+                                       cont_err("Perhaps a running "
                                                "process, mounted filesystem "
                                                "or active volume group?\n");
                        }
diff --git a/mdadm.c b/mdadm.c
index a4980a79ed92321de0fc0756715ffdfab9c55565..1b272848a50c0291629f3e5a299fa2b2f4bbfc11 100644 (file)
--- a/mdadm.c
+++ b/mdadm.c
@@ -279,7 +279,7 @@ int main(int argc, char *argv[])
                        if (mode == MISC && devs_found) {
                                pr_err("No action given for %s in --misc mode\n",
                                        devlist->devname);
-                               fprintf(stderr,"       Action options must come before device names\n");
+                               cont_err("Action options must come before device names\n");
                                exit(2);
                        }
                } else {
index 5a0250eecc02d44ca115710b23a9fc079043587e..1b7d626b63cd9e024ef181be206034a536cdbbff 100644 (file)
@@ -3840,9 +3840,9 @@ static int find_intel_hba_capability(int fd, struct intel_super *super, char *de
                                hba = hba->next;
                        }
 
-                       fprintf(stderr, ").\n"
-                               "    Mixing devices attached to multiple controllers "
-                               "is not allowed.\n");
+                       fprintf(stderr, ").\n");
+                       cont_err("Mixing devices attached to multiple controllers "
+                                "is not allowed.\n");
                }
                return 2;
        }
diff --git a/util.c b/util.c
index 3d2c3f09ad67bdc75165a50f8523161efb4fdb07..c18105fe7822aa57388d40d2228ea97e32c5d29c 100644 (file)
--- a/util.c
+++ b/util.c
@@ -521,7 +521,7 @@ int check_ext2(int fd, char *name)
        size = sb[4]|(sb[5]|(sb[6]|sb[7]<<8)<<8)<<8;
        pr_err("%s appears to contain an ext2fs file system\n",
                name);
-       fprintf(stderr,"    size=%dK  mtime=%s",
+       cont_err("size=%dK  mtime=%s",
                size*(1<<bsize), ctime(&mtime));
        return 1;
 }
@@ -545,7 +545,7 @@ int check_reiser(int fd, char *name)
                return 0;
        pr_err("%s appears to contain a reiserfs file system\n",name);
        size = sb[0]|(sb[1]|(sb[2]|sb[3]<<8)<<8)<<8;
-       fprintf(stderr, "    size = %luK\n", size*4);
+       cont_err("size = %luK\n", size*4);
 
        return 1;
 }
@@ -568,8 +568,8 @@ int check_raid(int fd, char *name)
        crtime = info.array.ctime;
        level = map_num(pers, info.array.level);
        if (!level) level = "-unknown-";
-       fprintf(stderr, "    level=%s devices=%d ctime=%s",
-               level, info.array.raid_disks, ctime(&crtime));
+       cont_err("level=%s devices=%d ctime=%s",
+                level, info.array.raid_disks, ctime(&crtime));
        return 1;
 }