VirtualBox

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


Ignore:
Timestamp:
Jan 13, 2010 9:58:10 AM (15 years ago)
Author:
vboxsync
Message:

Solaris/Additions: prevent automatic module unloading, uninit vars.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c

    r21170 r25798  
    186186{
    187187    LogFlow((DEVICE_NAME ":_init\n"));
     188
     189    /*
     190     * Prevent module autounloading.
     191     */
     192    modctl_t *pModCtl = mod_getctl(&g_VBoxGuestSolarisModLinkage);
     193    if (pModCtl)
     194        pModCtl->mod_loadflags |= MOD_NOAUTOUNLOAD;
     195    else
     196        LogRel((DEVICE_NAME ":failed to disable autounloading!\n"));
     197
    188198    int rc = ddi_soft_state_init(&g_pVBoxGuestSolarisState, sizeof(vboxguest_state_t), 1);
    189199    if (!rc)
     
    420430{
    421431    int                 rc;
    422     PVBOXGUESTSESSION   pSession;
     432    PVBOXGUESTSESSION   pSession = NULL;
    423433
    424434    LogFlow((DEVICE_NAME "::Open\n"));
     
    472482    LogFlow((DEVICE_NAME "::Close pid=%d\n", (int)RTProcSelf()));
    473483
    474     PVBOXGUESTSESSION pSession;
     484    PVBOXGUESTSESSION pSession = NULL;
    475485    vboxguest_state_t *pState = ddi_get_soft_state(g_pVBoxGuestSolarisState, getminor(Dev));
    476486    if (!pState)
     
    503513    LogFlow((DEVICE_NAME "::Read\n"));
    504514
    505     PVBOXGUESTSESSION pSession;
    506515    vboxguest_state_t *pState = ddi_get_soft_state(g_pVBoxGuestSolarisState, getminor(Dev));
    507516    if (!pState)
     
    511520    }
    512521
     522    PVBOXGUESTSESSION pSession = pState->pSession;
    513523    uint32_t u32CurSeq = ASMAtomicUoReadU32(&g_DevExt.u32MousePosChangedSeq);
    514524    if (pSession->u32MousePosChangedSeq != u32CurSeq)
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