From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Daley Subject: [PATCH v2] libxl: check for xc_domain_max_vcpus failure in libxl__build_pre Date: Fri, 1 Nov 2013 13:29:21 +1300 Message-ID: <1383265761-10813-1-git-send-email-mattjd@gmail.com> References: <1383254994.5436.145.camel@dagon.hellion.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1383254994.5436.145.camel@dagon.hellion.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Matthew Daley , Ian Jackson , Ian Campbell , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Coverity-ID: 1055047 Signed-off-by: Matthew Daley --- v2: Correct error message (get -> set) tools/libxl/libxl_dom.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index 1873459..c164469 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -209,7 +209,10 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid, char *xs_domid, *con_domid; int rc; - xc_domain_max_vcpus(ctx->xch, domid, info->max_vcpus); + if (xc_domain_max_vcpus(ctx->xch, domid, info->max_vcpus) != 0) { + LOG(ERROR, "Couldn't set max vcpu count"); + return ERROR_FAIL; + } /* * Check if the domain has any CPU affinity. If not, try to build -- 1.7.10.4