]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
Change some error messages to info level
authorXiao Ni <xni@redhat.com>
Wed, 22 May 2024 08:50:38 +0000 (16:50 +0800)
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Fri, 24 May 2024 08:03:53 +0000 (10:03 +0200)
These logs are not error logs. Change them to info level.

Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Assemble.c
Manage.c
util.c

index 58dc2c5e7bf0219516aafe8c412fad23d343b3f3..0e6da59331a4f83da66e83c7b73077dd92b2cb78 100644 (file)
@@ -1214,23 +1214,19 @@ static int start_array(int mdfd,
                if (rv == 0) {
                        sysfs_rules_apply(mddev, content);
                        if (c->verbose >= 0) {
-                               pr_err("%s has been started with %d drive%s",
+                               pr_info("%s has been started with %d drive%s",
                                       mddev, okcnt, okcnt==1?"":"s");
                                if (okcnt < (unsigned)content->array.raid_disks)
-                                       fprintf(stderr, " (out of %d)",
-                                               content->array.raid_disks);
+                                       printf(" (out of %d)", content->array.raid_disks);
                                if (rebuilding_cnt)
-                                       fprintf(stderr, "%s %d rebuilding",
-                                               sparecnt?",":" and",
+                                       printf("%s %d rebuilding", sparecnt?",":" and",
                                                rebuilding_cnt);
                                if (sparecnt)
-                                       fprintf(stderr, " and %d spare%s",
-                                               sparecnt,
+                                       printf(" and %d spare%s", sparecnt,
                                                sparecnt == 1 ? "" : "s");
                                if (content->journal_clean)
-                                       fprintf(stderr, " and %d journal",
-                                               journalcnt);
-                               fprintf(stderr, ".\n");
+                                       printf(" and %d journal", journalcnt);
+                               printf(".\n");
                        }
                        if (content->reshape_active &&
                            is_level456(content->array.level)) {
index 96e5ee5427a243bd70ca6d11c2e77a54f2362838..5db72b778fbe59e8a620fe8d4c2106f79ebe3bf4 100644 (file)
--- a/Manage.c
+++ b/Manage.c
@@ -463,7 +463,7 @@ done:
        }
 
        if (verbose >= 0)
-               pr_err("stopped %s\n", devname);
+               pr_info("stopped %s\n", devname);
        map_lock(&map);
        map_remove(&map, devnm);
        map_unlock(&map);
diff --git a/util.c b/util.c
index bf79742fe44e16c7f2a1e4464146fdfc0f0b243d..48c97545a42a619235eaf3125a26ce133d53479b 100644 (file)
--- a/util.c
+++ b/util.c
@@ -633,9 +633,9 @@ int check_ext2(int fd, char *name)
        bsize = sb[24]|(sb[25]|(sb[26]|sb[27]<<8)<<8)<<8;
        size = sb[4]|(sb[5]|(sb[6]|sb[7]<<8)<<8)<<8;
        size <<= bsize;
-       pr_err("%s appears to contain an ext2fs file system\n",
+       pr_info("%s appears to contain an ext2fs file system\n",
                name);
-       cont_err("size=%lluK  mtime=%s", size, ctime(&mtime));
+       pr_info("size=%lluK  mtime=%s", size, ctime(&mtime));
        return 1;
 }