Changeset 4339 in vbox for trunk/src/VBox
- Timestamp:
- Aug 24, 2007 10:19:27 AM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 23879
- Location:
- trunk/src/VBox/Main
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/HardDiskImpl.cpp
r4071 r4339 3224 3224 else 3225 3225 CFGLDRDeleteAttribute (aStorageNode, "port"); 3226 /* lun (optional ) */3226 /* lun (optional, force 0x format to coform to XML Schema!) */ 3227 3227 if (mLun != 0) 3228 CFGLDRSetUInt64 (aStorageNode, "lun", mLun);3228 CFGLDRSetUInt64Ex (aStorageNode, "lun", mLun, 16); 3229 3229 else 3230 3230 CFGLDRDeleteAttribute (aStorageNode, "lun"); -
trunk/src/VBox/Main/ParallelPortImpl.cpp
r4324 r4339 288 288 ComAssertRCRet (vrc, E_FAIL); 289 289 290 CFGLDRSetUInt32 (portNode, "slot", mData->mSlot);291 CFGLDRSetBool (portNode, "enabled", !!mData->mEnabled);292 CFGLDRSetUInt32 (portNode, "IOBase", mData->mIOBase);293 CFGLDRSetUInt32 (portNode, "IRQ", mData->mIRQ);294 CFGLDRSetBSTR (portNode, "path", mData->mPath);290 CFGLDRSetUInt32 (portNode, "slot", mData->mSlot); 291 CFGLDRSetBool (portNode, "enabled", !!mData->mEnabled); 292 CFGLDRSetUInt32Ex (portNode, "IOBase", mData->mIOBase, 16); 293 CFGLDRSetUInt32 (portNode, "IRQ", mData->mIRQ); 294 CFGLDRSetBSTR (portNode, "path", mData->mPath); 295 295 296 296 return S_OK; … … 374 374 STDMETHODIMP ParallelPort::COMSETTER(IRQ)(ULONG aIRQ) 375 375 { 376 /* check IRQ limits 377 * (when changing this, make sure it corresponds to XML schema */ 378 if (aIRQ > 255) 379 return setError (E_INVALIDARG, 380 tr ("Invalid IRQ number: %lu (must be in range [0, %lu])"), 381 aIRQ, 255); 382 376 383 AutoCaller autoCaller (this); 377 384 CheckComRCReturnRC (autoCaller.rc()); … … 421 428 STDMETHODIMP ParallelPort::COMSETTER(IOBase)(ULONG aIOBase) 422 429 { 430 /* check IOBase limits 431 * (when changing this, make sure it corresponds to XML schema */ 432 if (aIOBase > 0xFFFF) 433 return setError (E_INVALIDARG, 434 tr ("Invalid I/O port base address: %lu (must be in range [0, 0x%X])"), 435 aIOBase, 0, 0xFFFF); 436 423 437 AutoCaller autoCaller (this); 424 438 CheckComRCReturnRC (autoCaller.rc()); -
trunk/src/VBox/Main/SerialPortImpl.cpp
r4324 r4339 315 315 break; 316 316 } 317 CFGLDRSetUInt32 (portNode, "slot",mData->mSlot);318 CFGLDRSetBool (portNode, "enabled",!!mData->mEnabled);319 CFGLDRSetUInt32 (portNode, "IOBase", mData->mIOBase);320 CFGLDRSetUInt32 (portNode, "IRQ",mData->mIRQ);321 CFGLDRSetString (portNode, "hostMode", mode);317 CFGLDRSetUInt32 (portNode, "slot", mData->mSlot); 318 CFGLDRSetBool (portNode, "enabled", !!mData->mEnabled); 319 CFGLDRSetUInt32Ex (portNode, "IOBase", mData->mIOBase, 16); 320 CFGLDRSetUInt32 (portNode, "IRQ", mData->mIRQ); 321 CFGLDRSetString (portNode, "hostMode", mode); 322 322 if (mData->mHostMode != PortMode_DisconnectedPort) 323 323 { … … 459 459 STDMETHODIMP SerialPort::COMSETTER(IRQ)(ULONG aIRQ) 460 460 { 461 /* check IRQ limits 462 * (when changing this, make sure it corresponds to XML schema */ 463 if (aIRQ > 255) 464 return setError (E_INVALIDARG, 465 tr ("Invalid IRQ number: %lu (must be in range [0, %lu])"), 466 aIRQ, 255); 467 461 468 AutoCaller autoCaller (this); 462 469 CheckComRCReturnRC (autoCaller.rc()); … … 506 513 STDMETHODIMP SerialPort::COMSETTER(IOBase)(ULONG aIOBase) 507 514 { 515 /* check IOBase limits 516 * (when changing this, make sure it corresponds to XML schema */ 517 if (aIOBase > 0xFFFF) 518 return setError (E_INVALIDARG, 519 tr ("Invalid I/O port base address: %lu (must be in range [0, 0x%X])"), 520 aIOBase, 0, 0xFFFF); 521 508 522 AutoCaller autoCaller (this); 509 523 CheckComRCReturnRC (autoCaller.rc()); -
trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
r4324 r4339 50 50 </xsd:simpleType> 51 51 52 <xsd:simpleType name="TUInt64"> 52 <xsd:simpleType name="TUInt8"> 53 <xsd:union> 54 <xsd:simpleType> 55 <xsd:restriction base="xsd:unsignedByte"> 56 </xsd:restriction> 57 </xsd:simpleType> 58 <xsd:simpleType> 59 <xsd:restriction base="xsd:string"> 60 <xsd:pattern value="0[xX][A-Fa-f0-9]{1,2}"/> 61 </xsd:restriction> 62 </xsd:simpleType> 63 </xsd:union> 64 </xsd:simpleType> 65 66 <xsd:simpleType name="TUInt16"> 67 <xsd:union> 68 <xsd:simpleType> 69 <xsd:restriction base="xsd:unsignedShort"> 70 </xsd:restriction> 71 </xsd:simpleType> 72 <xsd:simpleType> 73 <xsd:restriction base="xsd:string"> 74 <xsd:pattern value="0[xX][A-Fa-f0-9]{1,4}"/> 75 </xsd:restriction> 76 </xsd:simpleType> 77 </xsd:union> 78 </xsd:simpleType> 79 80 <xsd:simpleType name="TUInt64Hex"> 53 81 <xsd:restriction base="xsd:string"> 54 82 <xsd:pattern value="0x[A-Fa-f0-9]{1,16}"/> … … 211 239 <xsd:attribute name="port" type="xsd:unsignedShort" default="0"/> 212 240 <xsd:attribute name="target" type="xsd:token" use="required"/> 213 <xsd:attribute name="lun" type="TUInt64 " default="0x0"/>241 <xsd:attribute name="lun" type="TUInt64Hex" default="0x0"/> 214 242 <xsd:attribute name="userName" type="xsd:token"/> 215 243 <xsd:attribute name="password" type="xsd:token"/> … … 478 506 <xsd:complexType name="TUSBController"> 479 507 <xsd:sequence> 480 <xsd:element name="Device" minOccurs="0" maxOccurs="unbounded">481 <xsd:complexType>482 <xsd:attribute name="vendorid" type="xsd:unsignedShort" use="required"/>483 <xsd:attribute name="productid" type="xsd:unsignedShort" use="required"/>484 <xsd:attribute name="revision" type="xsd:unsignedShort" use="required"/>485 <xsd:attribute name="serialhash" type="TUInt64" use="required"/>486 <xsd:attribute name="manufacturer" type="xsd:string"/>487 <xsd:attribute name="product" type="xsd:string"/>488 <xsd:attribute name="serialnumber" type="xsd:string"/>489 <xsd:attribute name="comment" type="xsd:string"/>490 </xsd:complexType>491 </xsd:element>492 508 <xsd:element name="DeviceFilter" type="TUSBDeviceFilter" 493 509 minOccurs="0" maxOccurs="unbounded"/> … … 529 545 </xsd:attribute> 530 546 <xsd:attribute name="enabled" type="xsd:boolean" use="required"/> 531 <xsd:attribute name="IRQ" type=" xsd:unsignedInt" use="required"/>532 <xsd:attribute name="IOBase" type=" xsd:unsignedInt" use="required"/>547 <xsd:attribute name="IRQ" type="TUInt8" use="required"/> 548 <xsd:attribute name="IOBase" type="TUInt16" use="required"/> 533 549 <xsd:attribute name="hostMode" type="TPortMode" use="required"/> 534 550 <xsd:attribute name="path" type="TLocalFile"/> … … 559 575 </xsd:attribute> 560 576 <xsd:attribute name="enabled" type="xsd:boolean" use="required"/> 561 <xsd:attribute name="IRQ" type=" xsd:unsignedInt" use="required"/>562 <xsd:attribute name="IOBase" type=" xsd:unsignedInt" use="required"/>577 <xsd:attribute name="IRQ" type="TUInt8" use="required"/> 578 <xsd:attribute name="IOBase" type="TUInt16" use="required"/> 563 579 <xsd:attribute name="path" type="TLocalFile"/> 564 580 </xsd:complexType>
Note:
See TracChangeset
for help on using the changeset viewer.