tools/libxc: Fix error handling in get_cpuid_domain_info()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 29 Nov 2018 18:17:01 +0000 (18:17 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 30 Nov 2018 14:21:12 +0000 (14:21 +0000)
commit82855aba5bf91e50c81526167c11d4aeaf665e66
treeb4f4439dd4ab62546897812a629c8d72d004a070
parentc393b64dcee6684da25257b033148740cb6d7ff0
tools/libxc: Fix error handling in get_cpuid_domain_info()

get_cpuid_domain_info() has two conflicting return styles - either -error for
local failures, or -1/errno for hypercall failures.  Switch to consistently
use -error.

While fixing the xc_get_cpu_featureset(), take the opportunity to remove the
redundancy and move it to be adjacent to the other featureset handling.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxc/xc_cpuid_x86.c