VirtualBox

Changeset 90874 in vbox


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

Solaris host: bugref:10089 VBoxNetFlt: Fixed getinfo() callback.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c

    r82968 r90874  
    618618        case DDI_ATTACH:
    619619        {
    620             int instance = ddi_get_instance(pDip);
    621             int rc = ddi_create_minor_node(pDip, DEVICE_NAME, S_IFCHR, instance, DDI_PSEUDO, CLONE_DEV);
     620            int rc = ddi_create_minor_node(pDip, DEVICE_NAME, S_IFCHR, 0 /* instance */, DDI_PSEUDO, CLONE_DEV);
    622621            if (rc == DDI_SUCCESS)
    623622            {
     
    728727        {
    729728            *ppvResult = g_pVBoxNetFltSolarisDip;
    730             return DDI_SUCCESS;
     729            return *ppvResult ? DDI_SUCCESS : DDI_FAILURE;
    731730        }
    732731
    733732        case DDI_INFO_DEVT2INSTANCE:
    734733        {
    735             int instance = getminor((dev_t)pvArg);
    736             *ppvResult = (void *)(uintptr_t)instance;
     734            /* There can only be a single-instance of this driver and thus its instance number is 0. */
     735            *ppvResult = (void *)0;
    737736            return DDI_SUCCESS;
    738737        }
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