From b8b768fbf6d767b87285e6693ffe12303362cb75 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Wed, 22 Jan 2014 16:33:21 -0500 Subject: [PATCH] VBOX: Vboxsvc doesn't return error codes in the same format as vboxmanage. Special case vboxsvc error code RPC_S_SERVER_UNAVAILABLE. --- samples/vboxwrapper/vbox.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/samples/vboxwrapper/vbox.cpp b/samples/vboxwrapper/vbox.cpp index f2cd054a6b..ed74624842 100644 --- a/samples/vboxwrapper/vbox.cpp +++ b/samples/vboxwrapper/vbox.cpp @@ -2719,6 +2719,13 @@ CLEANUP: sscanf(errcode.c_str(), "%x", &retval); } + // Is this a RPC_S_SERVER_UNAVAILABLE returned by vboxsvc? + if (!retval) { + if (output.find("RPC_S_SERVER_UNAVAILABLE") != string::npos) { + retval = RPC_S_SERVER_UNAVAILABLE; + } + } + // If something couldn't be found, just return ERR_FOPEN if (!retval) retval = ERR_FOPEN;