Re: [PATCH] openvz: detect when a domain was shut down from the inside

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

 



On 07/29/2011 02:41 AM, Jean-Baptiste Rouault wrote:
This patch adds an internal function openvzGetVEStatus to
get the real state of the domain. This function is used in
various places in the driver, in particular to detect when
the domain has been shut down by the user with the "halt"
command.
---
  src/openvz/openvz_driver.c |   76 +++++++++++++++++++++++++++++++++++++++-----
  1 files changed, 68 insertions(+), 8 deletions(-)

Posted awfully late after 0.9.4 RC1, but it can be argued that this is relatively limited-scope (openvz-only) and a bug fix, so I don't feel bad about pushing it.


diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index 4e7cb03..3b3b079 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -72,6 +72,7 @@ static int openvzDomainSetVcpusInternal(virDomainObjPtr vm,
                                          unsigned int nvcpus);
  static int openvzDomainSetMemoryInternal(virDomainObjPtr vm,
                                           unsigned long memory);
+static int openvzGetVEStatus(virDomainObjPtr vm, int *status, int *reason);

I'm not going to change the patch for this, but I generally like sorting static functions topologically so as not to have to do forward declarations, when possible (and this case is possible).

You failed 'make syntax-check' with some trailing spaces, and you used a // comment instead of /**/, but once those were fixed:

ACK and pushed.

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
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]