Changeset 81087 in vbox for trunk/src/VBox/Main/src-server/BIOSSettingsImpl.cpp
- Timestamp:
- Sep 30, 2019 6:55:28 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 133693
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/BIOSSettingsImpl.cpp
r76592 r81087 224 224 } 225 225 226 227 226 HRESULT BIOSSettings::setLogoFadeOut(BOOL enable) 228 227 { … … 256 255 } 257 256 258 259 257 HRESULT BIOSSettings::setLogoDisplayTime(ULONG displayTime) 260 258 { … … 284 282 } 285 283 286 287 284 HRESULT BIOSSettings::setLogoImagePath(const com::Utf8Str &imagePath) 288 285 { … … 311 308 } 312 309 313 314 310 HRESULT BIOSSettings::setBootMenuMode(BIOSBootMenuMode_T bootMenuMode) 315 311 { … … 340 336 } 341 337 342 343 338 HRESULT BIOSSettings::setACPIEnabled(BOOL enable) 344 339 { … … 369 364 } 370 365 371 372 366 HRESULT BIOSSettings::setIOAPICEnabled(BOOL aIOAPICEnabled) 373 367 { … … 398 392 } 399 393 400 401 394 HRESULT BIOSSettings::setAPICMode(APICMode_T aAPICMode) 402 395 { … … 427 420 } 428 421 429 430 422 HRESULT BIOSSettings::setPXEDebugEnabled(BOOL enable) 431 423 { … … 446 438 } 447 439 440 448 441 HRESULT BIOSSettings::getTimeOffset(LONG64 *offset) 449 442 { … … 455 448 } 456 449 457 458 450 HRESULT BIOSSettings::setTimeOffset(LONG64 offset) 459 451 { … … 474 466 } 475 467 468 469 HRESULT BIOSSettings::getNonVolatileStorageEnabled(BOOL *enabled) 470 { 471 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 472 473 *enabled = m->bd->fNVRAMEnabled; 474 475 return S_OK; 476 } 477 478 HRESULT BIOSSettings::setNonVolatileStorageEnabled(BOOL enable) 479 { 480 /* the machine needs to be mutable */ 481 AutoMutableStateDependency adep(m->pMachine); 482 if (FAILED(adep.rc())) return adep.rc(); 483 484 AutoCaller autoMachineCaller(m->pMachine); 485 AssertComRCReturnRC(autoMachineCaller.rc()); 486 487 { 488 AutoReadLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS); 489 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 490 491 m->bd.backup(); 492 m->bd->fNVRAMEnabled = RT_BOOL(enable); 493 if (enable && m->bd->strNVRAMPath.isEmpty()) 494 m->bd->strNVRAMPath = m->pMachine->i_getDefaultNVRAMFilename(); 495 } 496 497 AutoWriteLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS); // mParent is const, needs no locking 498 m->pMachine->i_setModified(Machine::IsModified_BIOS); 499 500 return S_OK; 501 } 502 503 476 504 HRESULT BIOSSettings::getNonVolatileStorageFile(com::Utf8Str &aNonVolatileStorageFile) 477 505 { 478 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 479 480 aNonVolatileStorageFile = ""; 506 Utf8Str strTmp; 507 { 508 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 509 strTmp = m->bd->strNVRAMPath; 510 } 511 512 m->pMachine->i_calculateFullPath(strTmp, aNonVolatileStorageFile); 481 513 482 514 return S_OK; … … 504 536 AssertComRCReturnRC(autoCaller.rc()); 505 537 538 AutoReadLock mlock(m->pMachine COMMA_LOCKVAL_SRC_POS); 506 539 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 507 540 508 541 // simply copy 509 542 m->bd.assignCopy(&data); 543 544 Utf8Str strTmp(m->bd->strNVRAMPath); 545 m->pMachine->i_copyPathRelativeToMachine(strTmp, m->bd->strNVRAMPath); 510 546 511 547 return S_OK;
Note:
See TracChangeset
for help on using the changeset viewer.