Quick Updates

svn path=/trunk/boinc/; revision=24195
This commit is contained in:
Rom Walton 2011-09-14 00:20:17 +00:00
parent c94af43ea3
commit 54c27ff947
1 changed files with 8 additions and 0 deletions

View File

@ -298,6 +298,7 @@ bool VBOX_VM::is_running() {
string vmstate;
size_t vmstate_location;
size_t vmstate_length;
char buf[256];
command = "showvminfo \"" + vm_name + "\" ";
command += "--machinereadable ";
@ -309,6 +310,13 @@ bool VBOX_VM::is_running() {
vmstate_length = output.find("\"", vmstate_location);
vmstate = output.substr(vmstate_location, vmstate_length);
fprintf(
stderr,
"%s Current VM State is '%s'.\n",
boinc_msg_prefix(buf, sizeof(buf)),
vmstate.c_str()
);
// VirtualBox Documentation suggests that that a VM is running when its
// machine state is between MachineState_FirstOnline and MachineState_LastOnline
// which as of this writing is 5 and 17.