diff mbox series

[01/19] Change some error messages to info level

Message ID 20240522085056.54818-2-xni@redhat.com (mailing list archive)
State Accepted
Headers show
Series mdadm/tests: enhance/fix regression cases | expand

Commit Message

Xiao Ni May 22, 2024, 8:50 a.m. UTC
These logs are not error logs. Change them to info level.

Signed-off-by: Xiao Ni <xni@redhat.com>
---
 Assemble.c | 16 ++++++----------
 Manage.c   |  2 +-
 util.c     |  4 ++--
 3 files changed, 9 insertions(+), 13 deletions(-)

Comments

Mariusz Tkaczyk May 23, 2024, 2:20 p.m. UTC | #1
On Wed, 22 May 2024 16:50:38 +0800
Xiao Ni <xni@redhat.com> wrote:

> These logs are not error logs. Change them to info level.
> 
> Signed-off-by: Xiao Ni <xni@redhat.com>
> ---
Applied!

Thanks,
Mariusz
diff mbox series

Patch

diff --git a/Assemble.c b/Assemble.c
index 83dced19ceba..65cdb737382a 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -1209,23 +1209,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)) {
diff --git a/Manage.c b/Manage.c
index 96e5ee5427a2..5db72b778fbe 100644
--- 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 bf79742fe44e..48c97545a42a 100644
--- 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;
 }