VirtualBox

Ignore:
Timestamp:
Sep 26, 2019 4:57:53 PM (5 years ago)
Author:
vboxsync
Message:

Additions/VBoxClient: Removed ugly hack requiring --init-vbgl-[user|full] command line arguments to make the optional release logger work.

Location:
trunk/src/VBox/Additions/x11/VBoxClient
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/clipboard.cpp

    r80990 r81028  
    291291
    292292    /* Initialise the guest library. */
    293     int rc = VbglR3InitUser();
    294     if (RT_FAILURE(rc))
    295         VBClFatalError(("Failed to connect to the VirtualBox kernel service, rc=%Rrc\n", rc));
    296     rc = SharedClipboardSvcImplConnect();
     293    int rc = SharedClipboardSvcImplConnect();
    297294    /* Not RT_SUCCESS: VINF_PERMISSION_DENIED is host service not present. */
    298295    if (rc == VINF_SUCCESS)
  • trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp

    r79028 r81028  
    245245    if (x11Context.pDisplay == NULL)
    246246        return VINF_SUCCESS;
    247     /* Initialise the guest library. */
    248     rc = VbglR3InitUser();
    249     if (RT_FAILURE(rc))
    250         VBClFatalError(("Failed to connect to the VirtualBox kernel service, rc=%Rrc\n", rc));
    251247    rc = VbglR3CtlFilterMask(VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST, 0);
    252248    if (RT_FAILURE(rc))
  • trunk/src/VBox/Additions/x11/VBoxClient/display-svga.cpp

    r79028 r81028  
    188188    if (drmContext.hDevice == NIL_RTFILE)
    189189        return VINF_SUCCESS;
    190     /* Initialise the guest library. */
    191     rc = VbglR3InitUser();
    192     if (RT_FAILURE(rc))
    193         VBClFatalError(("Failed to connect to the VirtualBox kernel service, rc=%Rrc\n", rc));
    194190    rc = VbglR3CtlFilterMask(VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST, 0);
    195191    if (RT_FAILURE(rc))
  • trunk/src/VBox/Additions/x11/VBoxClient/draganddrop.cpp

    r79482 r81028  
    30443044    LogFlowFuncEnter();
    30453045
    3046     /* Initialise the guest library. */
    3047     int rc = VbglR3InitUser();
    3048     if (RT_FAILURE(rc))
    3049     {
    3050         VBClFatalError(("DnD: Failed to connect to the VirtualBox kernel service, rc=%Rrc\n", rc));
    3051         return rc;
    3052     }
    3053 
    30543046    /* Connect to the x11 server. */
    30553047    m_pDisplay = XOpenDisplay(NULL);
     
    30633055    if (!pHelpers)
    30643056        return VERR_NO_MEMORY;
     3057
     3058    int rc;
    30653059
    30663060    do
  • trunk/src/VBox/Additions/x11/VBoxClient/hostversion.cpp

    r76553 r81028  
    130130
    131131    NOREF(ppInterface);
    132     /* Initialise the guest library. */
    133     rc = VbglR3InitUser();
    134     if (RT_FAILURE(rc))
    135         VBClFatalError(("Failed to connect to the VirtualBox kernel service, rc=%Rrc\n", rc));
     132
    136133    /* Because we need desktop notifications to be displayed, wait
    137134     * some time to make the desktop environment load (as a work around). */
     
    225222    return &pService->pInterface;
    226223}
    227 
  • trunk/src/VBox/Additions/x11/VBoxClient/main.cpp

    r80378 r81028  
    250250        return RTMsgInitFailure(rc);
    251251
     252    rc = VbglR3InitUser();
     253    if (RT_FAILURE(rc))
     254        return RTMsgErrorExitFailure("VbglR3InitUser failed: %Rrc", rc);
     255
    252256    /* This should never be called twice in one process - in fact one Display
    253257     * object should probably never be used from multiple threads anyway. */
     
    273277            /* If the user is running in "no daemon" mode anyway, send critical
    274278             * logging to stdout as well. */
    275             /** @todo r=bird: Since the release logger isn't created until the service
    276              *        calls VbglR3InitUser or VbglR3Init or RTLogCreate, this whole
    277              *        exercise is pointless.  Added --init-vbgl-user and --init-vbgl-full
    278              *        for getting some work done. */
    279279            PRTLOGGER pReleaseLog = RTLogRelGetDefaultInstance();
    280280            if (pReleaseLog)
     
    337337                break;
    338338            g_pService = VBClDisplaySVGAX11Service();
    339         }
    340         /* bird: this is just a quick hack to get something out of the LogRel statements in the code. */
    341         else if (!strcmp(argv[i], "--init-vbgl-user"))
    342         {
    343             rc = VbglR3InitUser();
    344             if (RT_FAILURE(rc))
    345                 return RTMsgErrorExitFailure("VbglR3InitUser failed: %Rrc", rc);
    346         }
    347         else if (!strcmp(argv[i], "--init-vbgl-full"))
    348         {
    349             rc = VbglR3Init();
    350             if (RT_FAILURE(rc))
    351                 return RTMsgErrorExitFailure("VbglR3Init failed: %Rrc", rc);
    352339        }
    353340        else if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help"))
  • trunk/src/VBox/Additions/x11/VBoxClient/seamless.cpp

    r76553 r81028  
    286286{
    287287    struct SEAMLESSSERVICE *pSelf = getClassFromInterface(ppInterface);
    288     int rc;
    289288
    290289    if (pSelf->mIsInitialised)
    291290        return VERR_INTERNAL_ERROR;
    292     /* Initialise the guest library. */
    293     rc = VbglR3InitUser();
    294     if (RT_FAILURE(rc))
    295         VBClFatalError(("Failed to connect to the VirtualBox kernel service, rc=%Rrc\n", rc));
    296     rc = pSelf->mSeamless.init();
     291
     292    int rc = pSelf->mSeamless.init();
    297293    if (RT_FAILURE(rc))
    298294        return rc;
Note: See TracChangeset for help on using the changeset viewer.

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