Commit 7e862bb3 authored by Adrian Reber's avatar Adrian Reber Committed by Pavel Emelyanov

cr-service: set cr_errno if cpuinfo dump is not supported

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: 's avatarAdrian Reber <areber@redhat.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 24e7ad41
......@@ -837,10 +837,20 @@ 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);
break;
case 0:
success = true;
break;
default:
break;
}
success = true;
out:
resp.type = msg->type;
resp.success = success;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment