From 8564bc49e47bd46721408ac4a45e05000953a775 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Fri, 31 Jul 2020 13:58:35 +0300 Subject: [PATCH] check: Use pr_foo macros Instead of directly calling the print_on_level. The pr_msg/pr_warn seems to be better choise for all those cases. Signed-off-by: Pavel Emelyanov --- criu/cr-check.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/criu/cr-check.c b/criu/cr-check.c index b790c2ffb..66a99cf99 100644 --- a/criu/cr-check.c +++ b/criu/cr-check.c @@ -1304,7 +1304,7 @@ static int (*chk_feature)(void); "dump or restore failure." #define CHECK_CAT1(fn) do { \ if ((ret = fn) != 0) { \ - print_on_level(DEFAULT_LOGLEVEL, "%s\n", CHECK_BAD); \ + pr_warn("%s\n", CHECK_BAD); \ return ret; \ } \ } while (0) @@ -1336,8 +1336,7 @@ int cr_check(void) if (chk_feature) { if (chk_feature()) return -1; - print_on_level(DEFAULT_LOGLEVEL, "%s is supported\n", - feature_name(chk_feature)); + pr_msg("%s is supported\n", feature_name(chk_feature)); return 0; } @@ -1405,7 +1404,7 @@ int cr_check(void) ret |= check_compat_cr(); } - print_on_level(DEFAULT_LOGLEVEL, "%s\n", ret ? CHECK_MAYBE : CHECK_GOOD); + pr_msg("%s\n", ret ? CHECK_MAYBE : CHECK_GOOD); return ret; } #undef CHECK_GOOD