Skip to content

Commit fb8dc70

Browse files
committed
logging: Turn some warnings into info messages
1 parent f1d66ff commit fb8dc70

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

Diff for: compel/arch/x86/src/lib/infect.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ int compel_get_task_regs(pid_t pid, user_regs_struct_t *regs, user_fpregs_struct
337337
set_user_reg(regs, ip, get_user_reg(regs, ip) - 2);
338338
break;
339339
case -ERESTART_RESTARTBLOCK:
340-
pr_warn("Will restore %d with interrupted system call\n", pid);
340+
pr_info("Will restore %d with interrupted system call\n", pid);
341341
set_user_reg(regs, ax, -EINTR);
342342
break;
343343
}

Diff for: criu/cr-check.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,8 @@ int cr_check(void)
15271527
ret |= check_compat_cr();
15281528
}
15291529

1530-
pr_msg("%s\n", ret ? CHECK_MAYBE : CHECK_GOOD);
1530+
if (ret)
1531+
pr_msg("%s\n", CHECK_MAYBE);
15311532
return ret;
15321533
}
15331534
#undef CHECK_GOOD

Diff for: criu/cr-restore.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ static int prepare_oom_score_adj(int value)
829829
snprintf(buf, 11, "%d", value);
830830

831831
if (write(fd, buf, 11) < 0) {
832-
pr_perror("Write %s to /proc/self/oom_score_adj failed", buf);
832+
pr_info("Write %s to /proc/self/oom_score_adj failed: %s", buf, strerror(errno));
833833
ret = -1;
834834
}
835835

Diff for: criu/kerndat.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ static void kerndat_save_cache(void)
895895
return;
896896

897897
if (fstatfs(fd, &s) < 0 || s.f_type != TMPFS_MAGIC) {
898-
pr_warn("Can't keep kdat cache on non-tempfs\n");
898+
pr_info("Can't keep kdat cache on non-tempfs\n");
899899
close(fd);
900900
goto unl;
901901
}
@@ -1116,7 +1116,7 @@ static int kerndat_has_pidfd_getfd(void)
11161116

11171117
pidfd = syscall(SYS_pidfd_open, getpid(), 0);
11181118
if (pidfd == -1) {
1119-
pr_warn("Can't get pidfd\n");
1119+
pr_info("Can't get pidfd\n");
11201120
/*
11211121
* If pidfd_open is not supported then pidfd_getfd
11221122
* will not be supported as well.
@@ -1233,7 +1233,7 @@ static int kerndat_has_nftables_concat(void)
12331233
kdat.has_nftables_concat = has;
12341234
return 0;
12351235
#else
1236-
pr_warn("CRIU was built without libnftables support\n");
1236+
pr_info("CRIU was built without libnftables support\n");
12371237
kdat.has_nftables_concat = false;
12381238
return 0;
12391239
#endif

Diff for: criu/proc_parse.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ int prepare_loginuid(unsigned int value)
929929
snprintf(buf, 11, "%u", value);
930930

931931
if (write(fd, buf, 11) < 0) {
932-
pr_warn("Write %s to /proc/self/loginuid failed: %s\n", buf, strerror(errno));
932+
pr_info("Write %s to /proc/self/loginuid failed: %s\n", buf, strerror(errno));
933933
ret = -1;
934934
}
935935
close(fd);

Diff for: criu/sk-inet.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static int can_dump_inet_sk(const struct inet_sk_desc *sk)
147147
}
148148

149149
if (sk->rqlen)
150-
pr_warn("Read queue is dropped for socket %x\n", sk->sd.ino);
150+
pr_info("Read queue is dropped for socket %x\n", sk->sd.ino);
151151

152152
return 1;
153153
}

0 commit comments

Comments
 (0)