Currently this helper doesn't see "/proc/bc/%s/resources" (another mount ns?).
But this leads to a situation, when error is swallowed by the helper.
I.e. it returns 0 even if there was an error during restore.
So, let's return original error code instead.

https://jira.sw.ru/browse/PSBM-80056

Signed-off-by: Stanislav Kinsburskiy <skinsbur...@virtuozzo.com>
---
 criu/cr-restore.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index bd36523..6337c0f 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -2034,7 +2034,7 @@ static int bc_failcnt_check(int ret)
        snprintf(buf, sizeof(buf), "/proc/bc/%s/resources", veid);
        f = fopen(buf, "r");
        if (!f) {
-               return 0;
+               return ret;
        }
        
        while (fgets(buf, sizeof(buf), f)) {

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to