VirtualBox

Changeset 26123 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Feb 1, 2010 2:27:03 PM (15 years ago)
Author:
vboxsync
Message:

Solaris/Additions/vboxguest: make LogRel working again.

File:
1 edited

Legend:

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

    r25798 r26123  
    196196        LogRel((DEVICE_NAME ":failed to disable autounloading!\n"));
    197197
    198     int rc = ddi_soft_state_init(&g_pVBoxGuestSolarisState, sizeof(vboxguest_state_t), 1);
     198    PRTLOGGER pRelLogger;
     199    static const char * const s_apszGroups[] = VBOX_LOGGROUP_NAMES;
     200    int rc = RTLogCreate(&pRelLogger, 0 /* fFlags */, "all",
     201                     "VBOX_RELEASE_LOG", RT_ELEMENTS(s_apszGroups), s_apszGroups,
     202                     RTLOGDEST_STDOUT | RTLOGDEST_DEBUGGER, NULL);
     203    if (RT_SUCCESS(rc))
     204        RTLogRelSetDefaultInstance(pRelLogger);
     205
     206    rc = ddi_soft_state_init(&g_pVBoxGuestSolarisState, sizeof(vboxguest_state_t), 1);
    199207    if (!rc)
    200208    {
     
    213221    if (!rc)
    214222        ddi_soft_state_fini(&g_pVBoxGuestSolarisState);
     223
     224    RTLogDestroy(RTLogRelSetDefaultInstance(NULL));
     225    RTLogDestroy(RTLogSetDefaultInstance(NULL));
     226
    215227    return rc;
    216228}
     
    567579    if (!pState)
    568580    {
    569         Log((DEVICE_NAME "::IOCtl: no state data for %d\n", getminor(Dev)));
     581        LogRel((DEVICE_NAME "::IOCtl: no state data for %d\n", getminor(Dev)));
    570582        return EINVAL;
    571583    }
     
    574586    if (!pSession)
    575587    {
    576         Log((DEVICE_NAME "::IOCtl: no session data for %d\n", getminor(Dev)));
     588        LogRel((DEVICE_NAME "::IOCtl: no session data for %d\n", getminor(Dev)));
    577589        return EINVAL;
    578590    }
     
    603615                    || ReqWrap.cbData > _1M*16))
    604616    {
    605         Log((DEVICE_NAME "::IOCtl: bad size %#x; pArg=%p Cmd=%d.\n", ReqWrap.cbData, pArg, Cmd));
     617        LogRel((DEVICE_NAME "::IOCtl: bad size %#x; pArg=%p Cmd=%d.\n", ReqWrap.cbData, pArg, Cmd));
    606618        return EINVAL;
    607619    }
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