From 868de91a099c00f099d8a41557d660d173f72521 Mon Sep 17 00:00:00 2001 From: Radostin Stoyanov Date: Mon, 2 Jul 2018 21:43:45 +0100 Subject: [PATCH] kdat: Don't open /run/criu.kdat if doesn't exists When CRIU is called for a first time and the /run/criu.kdat file does not exists, the following warning is shown: Warn (criu/kerndat.c:847): Can't load /run/criu.kdat This patch is replacing this warning with a more appropriate debug message. File /run/criu.kdat does not exist Signed-off-by: Radostin Stoyanov Signed-off-by: Andrei Vagin --- criu/kerndat.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/criu/kerndat.c b/criu/kerndat.c index 3cb407c91..b884f6d15 100644 --- a/criu/kerndat.c +++ b/criu/kerndat.c @@ -835,7 +835,10 @@ static int kerndat_try_load_cache(void) fd = open(KERNDAT_CACHE_FILE, O_RDONLY); if (fd < 0) { - pr_warn("Can't load %s\n", KERNDAT_CACHE_FILE); + if(ENOENT == errno) + pr_debug("File %s does not exist\n", KERNDAT_CACHE_FILE); + else + pr_warn("Can't load %s\n", KERNDAT_CACHE_FILE); return 1; }