diff options
| author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2017-09-22 14:15:57 +0000 |
|---|---|---|
| committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2017-09-22 14:15:57 +0000 |
| commit | 2490d3c61dd4837509e56536aed2359f081f0646 (patch) | |
| tree | c7fa5aefe5a1d17014af72b0bbea2cffcd0319d5 /src/VBox/Main/src-all/ExtPackUtil.cpp | |
| parent | 6a5a3cf000cc434acccfb022dbea617b3b4c0775 (diff) | |
| download | VirtualBox-svn-2490d3c61dd4837509e56536aed2359f081f0646.tar.gz | |
ExtPack: Split up main module of extension pack, have a mandatory one for VBoxSVC and an optional one for the VM process. This finally eliminates the need to drag VBoxVMM into VBoxSVC on some platforms. Many other small cleanups, including reliably calling the unload hook from within a VM process, copy/paste with forgotten adjustments (e.g. extpacks still talking about skeleton) and spelling fixes.
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@68828 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/Main/src-all/ExtPackUtil.cpp')
| -rw-r--r-- | src/VBox/Main/src-all/ExtPackUtil.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/VBox/Main/src-all/ExtPackUtil.cpp b/src/VBox/Main/src-all/ExtPackUtil.cpp index c399983db0e..9f2e7ef50c2 100644 --- a/src/VBox/Main/src-all/ExtPackUtil.cpp +++ b/src/VBox/Main/src-all/ExtPackUtil.cpp @@ -4,7 +4,7 @@ */ /* - * Copyright (C) 2010-2016 Oracle Corporation + * Copyright (C) 2010-2017 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; @@ -73,6 +73,7 @@ static void vboxExtPackClearDesc(PVBOXEXTPACKDESC a_pExtPackDesc) a_pExtPackDesc->strEdition.setNull(); a_pExtPackDesc->uRevision = 0; a_pExtPackDesc->strMainModule.setNull(); + a_pExtPackDesc->strMainVMModule.setNull(); a_pExtPackDesc->strVrdeModule.setNull(); a_pExtPackDesc->cPlugIns = 0; a_pExtPackDesc->paPlugIns = NULL; @@ -163,6 +164,21 @@ static RTCString *vboxExtPackLoadDescFromDoc(xml::Document *a_pDoc, PVBOXEXTPACK return &(new RTCString("Invalid main module string: "))->append(pszMainModule); /* + * The main VM module, optional. + * Accept both none and empty as tokens of no main VM module. + */ + const char *pszMainVMModule = NULL; + const xml::ElementNode *pMainVMModuleElm = pVBoxExtPackElm->findChildElement("MainVMModule"); + if (pMainVMModuleElm) + { + pszMainVMModule = pMainVMModuleElm->getValue(); + if (!pszMainVMModule || *pszMainVMModule == '\0') + pszMainVMModule = NULL; + else if (!VBoxExtPackIsValidModuleString(pszMainVMModule)) + return &(new RTCString("Invalid main VM module string: "))->append(pszMainVMModule); + } + + /* * The VRDE module, optional. * Accept both none and empty as tokens of no VRDE module. */ @@ -204,6 +220,7 @@ static RTCString *vboxExtPackLoadDescFromDoc(xml::Document *a_pDoc, PVBOXEXTPACK a_pExtPackDesc->strEdition = pszEdition; a_pExtPackDesc->uRevision = uRevision; a_pExtPackDesc->strMainModule = pszMainModule; + a_pExtPackDesc->strMainVMModule = pszMainVMModule; a_pExtPackDesc->strVrdeModule = pszVrdeModule; a_pExtPackDesc->cPlugIns = cPlugIns; a_pExtPackDesc->paPlugIns = paPlugIns; @@ -361,6 +378,7 @@ void VBoxExtPackFreeDesc(PVBOXEXTPACKDESC a_pExtPackDesc) a_pExtPackDesc->strEdition.setNull(); a_pExtPackDesc->uRevision = 0; a_pExtPackDesc->strMainModule.setNull(); + a_pExtPackDesc->strMainVMModule.setNull(); a_pExtPackDesc->strVrdeModule.setNull(); a_pExtPackDesc->cPlugIns = 0; RTMemFree(a_pExtPackDesc->paPlugIns); |
