From: Juergen Gross Date: Tue, 7 Jun 2022 12:01:03 +0000 (+0200) Subject: tools/libs/ctrl: don't set errno to a negative value X-Git-Tag: archive/raspbian/4.16.2-1+rpi1^2~34^2~72 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ba62afdbc31a8cfe897191efd25ed4449d9acd94;p=xen.git tools/libs/ctrl: don't set errno to a negative value The claimed reason for setting errno to -1 is wrong. On x86 xc_domain_pod_target() will set errno to a sane value in the error case. Fixes: ff1745d5882b ("tools: libxl: do not set the PoD target on ARM") Signed-off-by: Juergen Gross Acked-by: Andrew Cooper master commit: a0fb7e0e73483ed042d5ca34861a891a51ad337b master date: 2022-04-22 20:39:34 +0100 --- diff --git a/tools/libs/ctrl/xc_domain.c b/tools/libs/ctrl/xc_domain.c index b155d6afd2..9d675c8f21 100644 --- a/tools/libs/ctrl/xc_domain.c +++ b/tools/libs/ctrl/xc_domain.c @@ -1297,9 +1297,7 @@ int xc_domain_get_pod_target(xc_interface *xch, uint64_t *pod_cache_pages, uint64_t *pod_entries) { - /* On x86 (above) xc_domain_pod_target will incorrectly return -1 - * with errno==-1 on error. Do the same for least surprise. */ - errno = -1; + errno = EOPNOTSUPP; return -1; } #endif