[CRIU] [PATCH] cr-service: set cr_errno if cpuinfo dump is not supported
Adrian Reber
adrian at lisas.de
Tue Nov 3 06:49:39 PST 2015
On Tue, Nov 03, 2015 at 09:54:10AM +0000, Adrian Reber wrote:
> From: Adrian Reber <areber at redhat.com>
>
> Right now only x86 supports dumping and checking the cpuinfo. All other
> architectures are returning -ENOTSUP and thus p.haul fails if started
> without '--force'. This adds -ENOTSUP to the RPC field cr_errno in the
> case cpuinfo dumping and checking failed with this return code.
>
> Signed-off-by: Adrian Reber <areber at redhat.com>
> ---
> cr-service.c | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/cr-service.c b/cr-service.c
> index 7fe0e48..89d794c 100644
> --- a/cr-service.c
> +++ b/cr-service.c
> @@ -837,10 +837,19 @@ cout:
> }
>
> wait(&status);
> - if (!WIFEXITED(status) || WEXITSTATUS(status))
> + if (!WIFEXITED(status))
> goto out;
> + switch (WEXITSTATUS(status)) {
> + case (-ENOTSUP & 0xff):
> + resp.has_cr_errno = 1;
> + resp.cr_errno = WEXITSTATUS(status);
> + case 0:
> + success = true;
> + break;
So I am returning true even if the result was -ENOTSUP. I will resend
this patch with an additional break.
Adrian
More information about the CRIU
mailing list