Changeset 29218 in vbox for trunk/src/VBox/Main/xml/Settings.cpp
- Timestamp:
- May 7, 2010 2:52:27 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r29116 r29218 1630 1630 IoSettings::IoSettings() 1631 1631 { 1632 ioMgrType = IoMgrType_Async;1633 ioBackendType = IoBackendType_Unbuffered;1634 1632 fIoCacheEnabled = true; 1635 1633 ulIoCacheSize = 5; … … 2514 2512 else if (pelmHwChild->nameEquals("IO")) 2515 2513 { 2516 Utf8Str strTemp;2517 2514 const xml::ElementNode *pelmIoChild; 2518 2515 2519 if ((pelmIoChild = pelmHwChild->findChildElement("IoMgr")))2520 {2521 if (pelmIoChild->getAttributeValue("type", strTemp))2522 {2523 if (strTemp == "Async")2524 hw.ioSettings.ioMgrType = IoMgrType_Async;2525 else if (strTemp == "Simple")2526 hw.ioSettings.ioMgrType = IoMgrType_Simple;2527 else2528 throw ConfigFileError(this, pelmIoChild, N_("Invalid value '%s' in IoMgr/@type attribute"), strTemp.c_str());2529 }2530 }2531 2532 if ((pelmIoChild = pelmHwChild->findChildElement("IoBackend")))2533 {2534 if (pelmIoChild->getAttributeValue("type", strTemp))2535 {2536 if (strTemp == "Unbuffered")2537 hw.ioSettings.ioBackendType = IoBackendType_Unbuffered;2538 else if (strTemp == "Buffered")2539 hw.ioSettings.ioBackendType = IoBackendType_Buffered;2540 else2541 throw ConfigFileError(this, pelmIoChild, N_("Invalid value '%s' in IoBackend/@type attribute"), strTemp.c_str());2542 }2543 }2544 2516 if ((pelmIoChild = pelmHwChild->findChildElement("IoCache"))) 2545 2517 { … … 3553 3525 const char *pcszTemp; 3554 3526 3555 switch (hw.ioSettings.ioMgrType)3556 {3557 case IoMgrType_Simple: pcszTemp = "Simple"; break;3558 case IoMgrType_Async:3559 default:3560 pcszTemp = "Async"; break;3561 }3562 3563 pelmIo->createChild("IoMgr")->setAttribute("type", pcszTemp);3564 3565 switch (hw.ioSettings.ioBackendType)3566 {3567 case IoBackendType_Buffered: pcszTemp = "Buffered"; break;3568 case IoBackendType_Unbuffered:3569 default:3570 pcszTemp = "Unbuffered"; break;3571 }3572 3573 pelmIo->createChild("IoBackend")->setAttribute("type", pcszTemp);3574 3575 3527 pelmIoCache = pelmIo->createChild("IoCache"); 3576 3528 pelmIoCache->setAttribute("enabled", hw.ioSettings.fIoCacheEnabled); … … 4086 4038 if ( hardwareMachine.ioSettings.fIoCacheEnabled != true 4087 4039 || hardwareMachine.ioSettings.ulIoCacheSize != 5 4088 || hardwareMachine.ioSettings.ulIoBandwidthMax != 0 4089 || hardwareMachine.ioSettings.ioMgrType != IoMgrType_Async 4090 || hardwareMachine.ioSettings.ioBackendType != IoBackendType_Unbuffered) 4040 || hardwareMachine.ioSettings.ulIoBandwidthMax != 0) 4091 4041 m->sv = SettingsVersion_v1_10; 4092 4042 }
Note:
See TracChangeset
for help on using the changeset viewer.