From 47dd312669562bc9467a98159105bb636f9652d3 Mon Sep 17 00:00:00 2001 From: "Hongzhi.Song" Date: Mon, 26 Nov 2018 21:22:15 -0500 Subject: criu: 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: Hongzhi.Song Signed-off-by: Bruce Ashfield --- recipes-containers/criu/criu_git.bb | 1 + ...on-t-open-run-criu.kdat-if-doesn-t-exists.patch | 42 ++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 recipes-containers/criu/files/0001-kdat-Don-t-open-run-criu.kdat-if-doesn-t-exists.patch (limited to 'recipes-containers/criu') diff --git a/recipes-containers/criu/criu_git.bb b/recipes-containers/criu/criu_git.bb index 00de417b..45195ea6 100644 --- a/recipes-containers/criu/criu_git.bb +++ b/recipes-containers/criu/criu_git.bb @@ -21,6 +21,7 @@ SRC_URI = "git://github.com/xemul/criu.git;protocol=git \ file://0002-criu-Skip-documentation-install.patch \ file://0001-criu-Change-libraries-install-directory.patch \ file://lib-Makefile-overwrite-install-lib-to-allow-multiarc.patch \ + file://0001-kdat-Don-t-open-run-criu.kdat-if-doesn-t-exists.patch \ " COMPATIBLE_HOST = "(x86_64|arm|aarch64).*-linux" diff --git a/recipes-containers/criu/files/0001-kdat-Don-t-open-run-criu.kdat-if-doesn-t-exists.patch b/recipes-containers/criu/files/0001-kdat-Don-t-open-run-criu.kdat-if-doesn-t-exists.patch new file mode 100644 index 00000000..805f7996 --- /dev/null +++ b/recipes-containers/criu/files/0001-kdat-Don-t-open-run-criu.kdat-if-doesn-t-exists.patch @@ -0,0 +1,42 @@ +From b9760919eb3f805dd3d2af5692b49cba9c468595 Mon Sep 17 00:00:00 2001 +From: "Hongzhi.Song" +Date: Mon, 26 Nov 2018 02:39:59 -0500 +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 + +Upstream-Status: Backport [https://github.com/checkpoint-restore/criu/commit/868de91a099c00f099d8a41557d660d173f72521] + +Signed-off-by: Hongzhi.Song +--- + criu/kerndat.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/criu/kerndat.c b/criu/kerndat.c +index 8cb5690..9fb475c 100644 +--- a/criu/kerndat.c ++++ b/criu/kerndat.c +@@ -789,7 +789,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; + } + +-- +2.8.1 + -- cgit v1.2.3-54-g00ecf