]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
tools/libs/guest: don't set errno to a negative value
authorJuergen Gross <jgross@suse.com>
Wed, 20 Apr 2022 07:31:18 +0000 (09:31 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 22 Apr 2022 19:39:34 +0000 (20:39 +0100)
Setting errno to a negative error value makes no sense.

Fixes: cb99a64029c9 ("libxc: arm: allow passing a device tree blob to the guest")
Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/libs/guest/xg_dom_core.c

index c17cf9f712df113caaa1238e46d4cbd522fd458e..c4f4e7f3e27a13f4cb72eb96552c921c6b45e4c8 100644 (file)
@@ -855,7 +855,7 @@ int xc_dom_devicetree_file(struct xc_dom_image *dom, const char *filename)
         return -1;
     return 0;
 #else
-    errno = -EINVAL;
+    errno = EINVAL;
     return -1;
 #endif
 }