libxl: fix usage of XEN_EOPNOTSUPP
authorRoger Pau Monne <roger.pau@citrix.com>
Tue, 3 May 2016 10:55:10 +0000 (12:55 +0200)
committerWei Liu <wei.liu2@citrix.com>
Wed, 4 May 2016 15:31:16 +0000 (16:31 +0100)
The errno values returned by libxc are already translated into the
underlying OS error space, so it's wrong to compare them against Xen error
codes.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl_dom_save.c

index 076be0409a7b3b1ce513d9c984d90df3c20b0c45..579039f067058e965854bafb30c636b787a7608a 100644 (file)
@@ -386,7 +386,7 @@ void libxl__domain_save(libxl__egc *egc, libxl__domain_save_state *dss)
      */
     ret = xc_domain_getvnuma(CTX->xch, domid, &nr_vnodes, &nr_vmemranges,
                              &nr_vcpus, NULL, NULL, NULL);
-    if (ret != -1 || errno != XEN_EOPNOTSUPP) {
+    if (ret != -1 || errno != EOPNOTSUPP) {
         LOG(ERROR, "Cannot save a guest with vNUMA configured");
         rc = ERROR_FAIL;
         goto out;