VirtualBox

Changeset 13303 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Oct 15, 2008 8:55:16 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
37976
Message:

Storage: Replace the assertions in the construction code with runtime errors because it is possible that hard disks are not accessible. Also fix a assertion because of a unitiallized semaphore in the IDE controller code

Location:
trunk/src/VBox/Devices/Storage
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r13144 r13303  
    50105010        {
    50115011            pCtl = &pThis->aCts[i];
    5012             fAllIdle &= ataAsyncIOIsIdle(pCtl, false);
    5013             if (!fAllIdle)
    5014                 break;
     5012
     5013            /*
     5014             * Only check if the thread is idling if the request mutex is set up.
     5015             * It is possible that the creation of the first controller failed and that
     5016             * the request mutex is not initialized on the second one yet
     5017             * But it would be called without the following check.
     5018             */
     5019            if (pCtl->AsyncIORequestMutex != NIL_RTSEMEVENT)
     5020            {
     5021                fAllIdle &= ataAsyncIOIsIdle(pCtl, false);
     5022                if (!fAllIdle)
     5023                    break;
     5024            }
    50155025        }
    50165026        if (    fAllIdle
     
    59565966            else
    59575967            {
    5958                 AssertMsgFailed(("Failed to attach LUN#%d. rc=%Rrc\n", pIf->iLUN, rc));
    59595968                switch (rc)
    59605969                {
  • trunk/src/VBox/Devices/Storage/DrvBlock.cpp

    r12653 r13303  
    872872        return VINF_SUCCESS;
    873873    if (RT_FAILURE(rc))
    874     {
    875         AssertLogRelMsgFailed(("Failed to attach driver below us! rc=%Rra\n", rc));
    876         return rc;
    877     }
     874        return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS,
     875                                   N_("Failed to attach driver below us! rc=%Rra\n"), rc);
     876
    878877    pThis->pDrvMedia = (PPDMIMEDIA)pBase->pfnQueryInterface(pBase, PDMINTERFACE_MEDIA);
    879878    if (!pThis->pDrvMedia)
  • trunk/src/VBox/Devices/Storage/DrvVD.cpp

    r12892 r13303  
    811811        else
    812812        {
    813            AssertMsgFailed(("Failed to open image '%s' rc=%Rrc\n", pszName, rc));
     813           rc = PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS,
     814                                    N_("Failed to open image '%s' in %s mode rc=%Rrc\n"), pszName,
     815                                    (uOpenFlags & VD_OPEN_FLAGS_READONLY) ? "readonly" : "read-write", rc);
    814816           break;
    815817        }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette