Re: [PATCH 06/11] openvz: Need to error check openvzDomainSetVcpusFlagsInternal()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2013年01月31日 03:36, John Ferlan wrote:
---
  src/openvz/openvz_driver.c | 9 +++++++--
  1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index e12a84b..61d8390 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -1,7 +1,7 @@
  /*
   * openvz_driver.c: core driver methods for managing OpenVZ VEs
   *
- * Copyright (C) 2010-2012 Red Hat, Inc.
+ * Copyright (C) 2010-2013 Red Hat, Inc.
   * Copyright (C) 2006, 2007 Binary Karma
   * Copyright (C) 2006 Shuveb Hussain
   * Copyright (C) 2007 Anoop Joe Cyriac
@@ -1367,7 +1367,12 @@ static int openvzDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
          goto cleanup;
      }

-    openvzDomainSetVcpusInternal(vm, nvcpus);
+    if (openvzDomainSetVcpusInternal(vm, nvcpus)<  0) {
+        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+                       _("Could not set number of virtual cpu"));

Generally, we use the term "vCPU".

+        goto cleanup;
+    }
+
      ret = 0;

  cleanup:

ACK with small change.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]