mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
libxc: Fix do_memory_op to return negative value on errors
instead of the -Exx values (which should go in errno). This patch has HUGE implications. There is a lot of APIs that are using do_memory_op. Fortunately most of them check for 'if (do_memory_op(..) < 0)' so will function properly. However there were some which printed the return value to the user. They have been fixed in: libxc: Don't assign return value to errno for E820 get/set xc_ calls. libxc: Check xc_sharing_* for proper return values. libxc: If xc_domain_add_to_physmap fails, include errno value libxc: Check xc_maximum_ram_page for negative return values. libxc: Check xc_domain_maximum_gpfn for negative return values Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
47865edc7f
commit
cd2f100f0f
1 file changed
+1
-1
@@ -516,7 +516,7 @@ int do_memory_op(xc_interface *xch, int cmd, void *arg, size_t len)
|
||||
{
|
||||
DECLARE_HYPERCALL;
|
||||
DECLARE_HYPERCALL_BOUNCE(arg, len, XC_HYPERCALL_BUFFER_BOUNCE_BOTH);
|
||||
long ret = -EINVAL;
|
||||
long ret = -1;
|
||||
|
||||
if ( xc_hypercall_bounce_pre(xch, arg) )
|
||||
{
|
||||
|
||||