VirtualBox

Ignore:
Timestamp:
Aug 22, 2007 2:49:19 PM (17 years ago)
Author:
vboxsync
Message:

Solaris

File:
1 edited

Legend:

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

    r4178 r4287  
    4545*******************************************************************************/
    4646/** The module name. */
    47 #define DEVICE_NAME    "vboxdrv"
    48 #define DEVICE_DESC    "VirtualBox Driver"
     47#define DEVICE_NAME              "vboxdrv"
     48#define DEVICE_DESC              "VirtualBox Driver"
     49#define DEVICE_MAXINSTANCES      16
    4950
    5051
     
    225226    }
    226227
     228    int instance;
     229    for (instance = 0; instance < DEVICE_MAXINSTANCES; instance++)
     230    {
     231        vbox_devstate_t *pState = ddi_get_soft_state (g_pVBoxDrvSolarisState, instance);
     232        if (pState)
     233            break;
     234    }
     235   
     236    if (instance >= DEVICE_MAXINSTANCES)
     237    {
     238        cmn_err(CE_NOTE, "All instances exhausted\n");
     239        return ENXIO;
     240    }
     241   
     242    *pDev = makedevice(getmajor(*pDev), instance);
     243       
    227244    return VBoxSupDrvErr2SolarisErr(rc);
    228245}
     
    351368                            pState->pDip = pDip;
    352369                            ddi_report_dev(pDip);
    353                            
    354                             cmn_err(CE_CONT, "VBoxDrvSolarisAttach: successful.");
    355370                            return DDI_SUCCESS;
    356371                        }
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