]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
tools/libs/ctrl: don't set errno to a negative value
authorJuergen Gross <jgross@suse.com>
Wed, 20 Apr 2022 07:31:17 +0000 (09:31 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 22 Apr 2022 19:39:34 +0000 (20:39 +0100)
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 <jgross@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/libs/ctrl/xc_domain.c

index ef62f66009857aefde934375b71004d2be5379d3..71608c00e9e980679a82e48c4731c97cb0811234 100644 (file)
@@ -1293,9 +1293,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