From b2c9ab132bcff3c2a5af310278016d1c8423c038 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Wed, 19 Nov 2014 14:18:33 -0500 Subject: [PATCH] VBOX: Make the conditions for one type of error case a bit clearer. --- samples/vboxwrapper/vbox_common.cpp | 5 +++++ samples/vboxwrapper/vbox_common.h | 1 + samples/vboxwrapper/vboxwrapper.cpp | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/samples/vboxwrapper/vbox_common.cpp b/samples/vboxwrapper/vbox_common.cpp index a2bc64ab83..8fddbfa2e0 100644 --- a/samples/vboxwrapper/vbox_common.cpp +++ b/samples/vboxwrapper/vbox_common.cpp @@ -420,6 +420,11 @@ bool VBOX_BASE::is_logged_failure_vm_extensions_not_supported() { return false; } +bool VBOX_BASE::is_logged_failure_vm_powerup() { + if (vm_log.find("Power up failed (vrc=VINF_SUCCESS, rc=E_FAIL (0X80004005))") != string::npos) return true; + return false; +} + bool VBOX_BASE::is_logged_failure_host_out_of_memory() { if (vm_log.find("VERR_EM_NO_MEMORY") != string::npos) return true; if (vm_log.find("VERR_NO_MEMORY") != string::npos) return true; diff --git a/samples/vboxwrapper/vbox_common.h b/samples/vboxwrapper/vbox_common.h index a0e540f002..f1b8108066 100644 --- a/samples/vboxwrapper/vbox_common.h +++ b/samples/vboxwrapper/vbox_common.h @@ -278,6 +278,7 @@ public: virtual bool is_logged_failure_vm_extensions_disabled(); virtual bool is_logged_failure_vm_extensions_in_use(); virtual bool is_logged_failure_vm_extensions_not_supported(); + virtual bool is_logged_failure_vm_powerup(); virtual bool is_logged_failure_host_out_of_memory(); virtual bool is_logged_failure_guest_job_out_of_memory(); virtual bool is_virtualbox_version_newer(int maj, int min, int rel); diff --git a/samples/vboxwrapper/vboxwrapper.cpp b/samples/vboxwrapper/vboxwrapper.cpp index 00a682aceb..14712b164a 100644 --- a/samples/vboxwrapper/vboxwrapper.cpp +++ b/samples/vboxwrapper/vboxwrapper.cpp @@ -1165,7 +1165,7 @@ int main(int argc, char** argv) { pVM->poll(true); // Did we timeout? - if (timeout <= dtime()) { + if (!pVM->online && (timeout <= dtime())) { vboxwrapper_msg_prefix(buf, sizeof(buf)); fprintf( stderr,