Skip to contentSkip to conversation

libxl: xc_domain_restore returns 0 on success, 1 on error

PATCH New Ian Campbell 1 participant 1 message Aug 23, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: xc_domain_restore returns 0 on success, 1 on error

# HG changeset patch
# User Ian Campbell <[email protected]>
# Date 1282552884 -3600
# Node ID a91d8968269257dd4514d1c3c9994c3997897f91 # Parent 79f44934fa9dbf56d60a6d9fb76b74081eafe75f
libxl: xc_domain_restore returns 0 on success, 1 on error

Fix restore_common to handle it this way.

tools/libxl/libxl_dom.c +1 -1
diff -r 79f44934fa9d -r a91d89682692 tools/libxl/libxl_dom.c
@@ -260,7 +260,7 @@ int restore_common(libxl_ctx *ctx, uint3
                              state->store_port, &state->store_mfn,
                              state->console_port, &state->console_mfn,
                              info->hvm, info->u.hvm.pae, 0);
-    if ( rc < 0 ) {
+    if ( rc ) {
         XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "restoring domain");
         return ERROR_FAIL;
     }