VirtualBox

Changeset 4193 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Aug 16, 2007 10:53:34 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
23685
Message:

SSMAFTER_DEBUG_IT hacks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/DevPCI.cpp

    r4071 r4193  
    10541054        return rc;
    10551055    if (u32 != (uint32_t)~0)
    1056     {
    1057         AssertMsgFailed(("u32=%#x\n", u32));
    1058         return rc;
    1059     }
     1056        AssertMsgFailedReturn(("u32=%#x\n", u32), rc);
    10601057
    10611058    /*
     
    10851082            if (pData->devices[i])
    10861083            {
    1087                 LogRel(("New device in slot %#x, %s\n", i, pData->devices[i]->name));
    1088                 AssertFailed();
    1089                 return VERR_SSM_LOAD_CONFIG_MISMATCH;
     1084                LogRel(("New device in slot %#x, %s (vendor=%#06x device=%#06x)\n", i, pData->devices[i]->name,
     1085                        PCIDevGetVendorId(pData->devices[i]), PCIDevGetDeviceId(pData->devices[i])));
     1086                if (SSMR3HandleGetAfter(pSSMHandle) != SSMAFTER_DEBUG_IT)
     1087                    AssertFailedReturn(VERR_SSM_LOAD_CONFIG_MISMATCH);
    10901088            }
    10911089        }
     1090
     1091        /* get the data */
     1092        SSMR3GetMem(pSSMHandle, DevTmp.config, sizeof(DevTmp.config));
     1093        rc = SSMR3GetS32(pSSMHandle, &DevTmp.Int.s.iIrq);
     1094        if (VBOX_FAILURE(rc))
     1095            return rc;
    10921096
    10931097        /* check that it's still around. */
     
    10951099        if (!pDev)
    10961100        {
    1097             LogRel(("Device in slot %#x has been removed!\n", i, pDev->name));
    1098             AssertFailed();
    1099             return VERR_SSM_LOAD_CONFIG_MISMATCH;
    1100         }
    1101 
    1102         /* restore it */
    1103         SSMR3GetMem(pSSMHandle, DevTmp.config, sizeof(DevTmp.config));
    1104         rc = SSMR3GetS32(pSSMHandle, &DevTmp.Int.s.iIrq);
    1105         if (VBOX_FAILURE(rc))
    1106             return rc;
     1101            LogRel(("Device in slot %#x has been removed! vendor=%#06x device=%#06x\n", i,
     1102                    PCIDevGetVendorId(&DevTmp), PCIDevGetDeviceId(&DevTmp)));
     1103            if (SSMR3HandleGetAfter(pSSMHandle) != SSMAFTER_DEBUG_IT)
     1104                AssertFailedReturn(VERR_SSM_LOAD_CONFIG_MISMATCH);
     1105            continue;
     1106        }
    11071107
    11081108        /* match the vendor id assuming that this will never be changed. */
     
    11121112            LogRel(("Device in slot %#x (%s) vendor id mismatch! saved=%.4Vhxs current=%.4Vhxs\n",
    11131113                    i, pDev->name, DevTmp.config, pDev->config));
    1114             AssertFailed();
    1115             return VERR_SSM_LOAD_CONFIG_MISMATCH;
     1114            AssertFailedReturn(VERR_SSM_LOAD_CONFIG_MISMATCH);
    11161115        }
    11171116
    11181117        /* commit the loaded device config. */
    11191118        memcpy(pDev->config, DevTmp.config, sizeof(pDev->config));
    1120         if (DevTmp.Int.s.iIrq >= PCI_DEVICES_MAX) {
    1121             AssertMsgFailed (("Device %s: Too many devices %d (max=%d)\n",
    1122                               pDev->name, DevTmp.Int.s.iIrq, PCI_DEVICES_MAX));
    1123             return VERR_TOO_MUCH_DATA;
     1119        if (DevTmp.Int.s.iIrq >= PCI_DEVICES_MAX)
     1120        {
     1121            LogRel(("Device %s: Too many devices %d (max=%d)\n", pDev->name, DevTmp.Int.s.iIrq, PCI_DEVICES_MAX));
     1122            AssertFailedReturn(VERR_TOO_MUCH_DATA);
    11241123        }
    11251124
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