mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
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:ff1745d588("tools: libxl: do not set the PoD target on ARM") Signed-off-by: Juergen Gross <jgross@suse.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> master commit:a0fb7e0e73master date: 2022-04-22 20:39:34 +0100
This commit is contained in:
1 parent
defa8807bf
commit
f151bb7ce4
1 file changed
+1
-3
@@ -1276,9 +1276,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
|
||||
|
||||