Changeset 73768 in vbox for trunk/src/VBox/Main/xml
- Timestamp:
- Aug 19, 2018 7:07:19 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 124451
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r72973 r73768 2495 2495 ulIRQ(4), 2496 2496 portMode(PortMode_Disconnected), 2497 fServer(false) 2497 fServer(false), 2498 uartType(UartType_U16550A) 2498 2499 { 2499 2500 } … … 2513 2514 && portMode == s.portMode 2514 2515 && strPath == s.strPath 2515 && fServer == s.fServer); 2516 && fServer == s.fServer 2517 && uartType == s.uartType); 2516 2518 } 2517 2519 … … 3637 3639 pelmPort->getAttributeValue("server", port.fServer); 3638 3640 3641 Utf8Str strUartType; 3642 if (pelmPort->getAttributeValue("uartType", strUartType)) 3643 { 3644 if (strUartType == "16450") 3645 port.uartType = UartType_U16450; 3646 else if (strUartType == "16550A") 3647 port.uartType = UartType_U16550A; 3648 else if (strUartType == "16750") 3649 port.uartType = UartType_U16750; 3650 else 3651 throw ConfigFileError(this, pelmPort, N_("Invalid value '%s' in UART/Port/@uartType attribute"), strUartType.c_str()); 3652 } 3653 3639 3654 ll.push_back(port); 3640 3655 } … … 6011 6026 } 6012 6027 pelmPort->setAttribute("hostMode", pcszHostMode); 6028 6029 if ( m->sv >= SettingsVersion_v1_17 6030 && port.uartType != UartType_U16550A) 6031 { 6032 const char *pcszUartType; 6033 6034 switch (port.uartType) 6035 { 6036 case UartType_U16450: pcszUartType = "16450"; break; 6037 case UartType_U16550A: pcszUartType = "16550A"; break; 6038 case UartType_U16750: pcszUartType = "16750"; break; 6039 default: pcszUartType = "16550A"; break; 6040 } 6041 pelmPort->setAttribute("uartType", pcszUartType); 6042 } 6013 6043 } 6014 6044 } … … 6982 7012 return; 6983 7013 } 7014 7015 /* 7016 * Check if any serial port uses a non 16550A serial port. 7017 */ 7018 for (SerialPortsList::const_iterator it = hardwareMachine.llSerialPorts.begin(); 7019 it != hardwareMachine.llSerialPorts.end(); 7020 ++it) 7021 { 7022 const SerialPort &port = *it; 7023 if (port.uartType != UartType_U16550A) 7024 { 7025 m->sv = SettingsVersion_v1_17; 7026 return; 7027 } 7028 } 6984 7029 } 6985 7030
Note:
See TracChangeset
for help on using the changeset viewer.