VirtualBox

Changeset 86877 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Nov 12, 2020 6:32:51 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
141338
Message:

Additions/VBoxDRMClient: Removed code duplication between VBoxClient / VBoxService by refactoring the VBoxDRMClient routines into VbglR3. Also improved error checking here and there, added @todos. bugref:9637

Location:
trunk/src/VBox/Additions/common
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/Makefile.kmk

    r83655 r86877  
    122122        VBoxGuestR3LibCpuHotPlug.cpp \
    123123        VBoxGuestR3LibCredentials.cpp \
     124        VBoxGuestR3LibDRMClient.cpp \
    124125        VBoxGuestR3LibEvent.cpp \
    125126        VBoxGuestR3LibGuestUser.cpp \
  • trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp

    r86876 r86877  
    894894}
    895895
    896 #ifdef VBOX_WITH_VBOXSERVICE_DRMRESIZE
    897 /**
    898  * Check for a guest property and start VBoxDRMClient if it exists.
    899  *
    900  */
    901 static void startDRMResize(void)
    902 {
    903     uint32_t uGuestPropSvcClientID;
    904     int rc = VbglR3GuestPropConnect(&uGuestPropSvcClientID);
    905     if (RT_SUCCESS(rc))
    906     {
    907         rc = VbglR3GuestPropExist(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/DRMResize");
    908         if (RT_SUCCESS(rc))
    909         {
    910             RTMsgInfo("Starting DRM resize service");
    911             char szDRMClientPath[RTPATH_MAX];
    912             RTPathExecDir(szDRMClientPath, RTPATH_MAX);
    913             RTPathStripSuffix(szDRMClientPath);
    914             RTPathAppend(szDRMClientPath, RTPATH_MAX, "VBoxDRMClient");
    915             const char *apszArgs[1] = { NULL };
    916             rc = RTProcCreate("VBoxDRMClient", apszArgs, RTENV_DEFAULT,
    917                               RTPROC_FLAGS_DETACHED | RTPROC_FLAGS_SEARCH_PATH, NULL);
    918             if (rc == -1)
    919                 RTMsgError("Could not start DRM resize service");
    920         }
    921     }
    922 }
    923 #endif /* VBOX_WITH_VBOXSERVICE_DRMRESIZE */
    924896
    925897int main(int argc, char **argv)
     
    11881160
    11891161#ifdef VBOX_WITH_VBOXSERVICE_DRMRESIZE
    1190     startDRMResize();
     1162        if (VbglR3DRMClientIsNeeded())
     1163    {
     1164        rc = VbglR3DRMClientStart();
     1165        if (RT_FAILURE(rc))
     1166            VGSvcError("Starting DRM resizing client failed with %Rrc\n", rc);
     1167    }
    11911168#endif /* VBOX_WITH_VBOXSERVICE_DRMRESIZE */
    11921169
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette