VirtualBox

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


Ignore:
Timestamp:
Feb 5, 2008 7:41:33 AM (17 years ago)
Author:
vboxsync
Message:

Solaris vboxguest: added proper checks while setting up IRQs.

File:
1 edited

Legend:

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

    r6776 r6803  
    855855    return rc;
    856856#else
    857     int IntrType;
     857    int IntrType = 0;
    858858    int rc = ddi_intr_get_supported_types(pDip, &IntrType);
    859859    if (rc == DDI_SUCCESS)
     
    862862        if (IntrType & DDI_INTR_TYPE_FIXED)
    863863        {
    864             int IntrCount;
     864            int IntrCount = 0;
    865865            rc = ddi_intr_get_nintrs(pDip, IntrType, &IntrCount);
    866             if (rc == DDI_SUCCESS)
     866            if (   rc == DDI_SUCCESS
     867                && IntrCount > 0)
    867868            {
    868                 int IntrAvail;
     869                int IntrAvail = 0;
    869870                rc = ddi_intr_get_navail(pDip, IntrType, &IntrAvail);
    870                 if (rc == DDI_SUCCESS)
     871                if (   rc == DDI_SUCCESS
     872                    && IntrAvail > 0)
    871873                {
    872874                    /* Allocated kernel memory for the interrupt handles. The allocation size is stored internally. */
     
    924926                }
    925927                else
    926                     LogRel((DEVICE_NAME ":VBoxGuestSolarisAddIRQ: failed to get available IRQs. rc=%d\n", rc));
     928                    LogRel((DEVICE_NAME ":VBoxGuestSolarisAddIRQ: failed to get or insufficient available IRQs. rc=%d IntrAvail=%d\n", rc, IntrAvail));
    927929            }
    928930            else
    929                 LogRel((DEVICE_NAME ":VBoxGuestSolarisAddIRQ: failed to get number of IRQs. rc=%d\n", rc));
     931                LogRel((DEVICE_NAME ":VBoxGuestSolarisAddIRQ: failed to get or insufficient number of IRQs. rc=%d IntrCount=%d\n", rc, IntrCount));
    930932        }
    931933        else
    932             LogRel((DEVICE_NAME ":VBoxGuestSolarisAddIRQ: invalid irq type. IntrType=%d\n", IntrType));
     934            LogRel((DEVICE_NAME ":VBoxGuestSolarisAddIRQ: invalid irq type. IntrType=%#x\n", IntrType));
    933935    }
    934936    else
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