VirtualBox

Changeset 90876 in vbox for trunk/src


Ignore:
Timestamp:
Aug 25, 2021 11:30:45 AM (3 years ago)
Author:
vboxsync
Message:

Solaris guest: bugref:10089 vboxms: Fixed getinfo() callback.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/solaris/Mouse/vboxms.c

    r82968 r90876  
    329329        {
    330330            int rc;
    331             int instance = ddi_get_instance(pDip);
    332331            /* Only one instance supported. */
    333332            if (!ASMAtomicCmpXchgPtr(&g_OpenNodeState.pDip, pDip, NULL))
    334333                return DDI_FAILURE;
    335             rc = ddi_create_minor_node(pDip, DEVICE_NAME, S_IFCHR, instance, DDI_PSEUDO, 0);
     334            rc = ddi_create_minor_node(pDip, DEVICE_NAME, S_IFCHR, 0 /* instance */, DDI_PSEUDO, 0 /* flags */);
    336335            if (rc == DDI_SUCCESS)
    337336                return DDI_SUCCESS;
     
    403402    {
    404403        case DDI_INFO_DEVT2DEVINFO:
     404        {
    405405            *ppvResult = (void *)g_OpenNodeState.pDip;
     406            if (!*ppvResult)
     407                rc = DDI_FAILURE;
    406408            break;
     409        }
    407410
    408411        case DDI_INFO_DEVT2INSTANCE:
    409             *ppvResult = (void *)(uintptr_t)ddi_get_instance(g_OpenNodeState.pDip);
     412        {
     413            /* There can only be a single-instance of this driver and thus its instance number is 0. */
     414            *ppvResult = (void *)0;
    410415            break;
     416        }
    411417
    412418        default:
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