~ubuntu-branches/ubuntu/trusty/virtualbox-ose/trusty

« back to all changes in this revision

Viewing changes to src/VBox/Main/BIOSSettingsImpl.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
HRESULT BIOSSettings::init (Machine *aParent)
52
52
{
53
53
    LogFlowThisFuncEnter();
54
 
    LogFlowThisFunc (("aParent: %p\n", aParent));
 
54
    LogFlowThisFunc(("aParent: %p\n", aParent));
55
55
 
56
56
    ComAssertRet (aParent, E_INVALIDARG);
57
57
 
58
58
    /* Enclose the state transition NotReady->InInit->Ready */
59
 
    AutoInitSpan autoInitSpan (this);
60
 
    AssertReturn (autoInitSpan.isOk(), E_FAIL);
 
59
    AutoInitSpan autoInitSpan(this);
 
60
    AssertReturn(autoInitSpan.isOk(), E_FAIL);
61
61
 
62
62
    /* share the parent weakly */
63
 
    unconst (mParent) = aParent;
 
63
    unconst(mParent) = aParent;
64
64
 
65
65
    mData.allocate();
66
66
 
81
81
HRESULT BIOSSettings::init (Machine *aParent, BIOSSettings *that)
82
82
{
83
83
    LogFlowThisFuncEnter();
84
 
    LogFlowThisFunc (("aParent: %p, that: %p\n", aParent, that));
 
84
    LogFlowThisFunc(("aParent: %p, that: %p\n", aParent, that));
85
85
 
86
86
    ComAssertRet (aParent && that, E_INVALIDARG);
87
87
 
88
88
    /* Enclose the state transition NotReady->InInit->Ready */
89
 
    AutoInitSpan autoInitSpan (this);
90
 
    AssertReturn (autoInitSpan.isOk(), E_FAIL);
 
89
    AutoInitSpan autoInitSpan(this);
 
90
    AssertReturn(autoInitSpan.isOk(), E_FAIL);
91
91
 
92
92
    mParent = aParent;
93
93
    mPeer = that;
109
109
HRESULT BIOSSettings::initCopy (Machine *aParent, BIOSSettings *that)
110
110
{
111
111
    LogFlowThisFuncEnter();
112
 
    LogFlowThisFunc (("aParent: %p, that: %p\n", aParent, that));
 
112
    LogFlowThisFunc(("aParent: %p, that: %p\n", aParent, that));
113
113
 
114
114
    ComAssertRet (aParent && that, E_INVALIDARG);
115
115
 
116
116
    /* Enclose the state transition NotReady->InInit->Ready */
117
 
    AutoInitSpan autoInitSpan (this);
118
 
    AssertReturn (autoInitSpan.isOk(), E_FAIL);
 
117
    AutoInitSpan autoInitSpan(this);
 
118
    AssertReturn(autoInitSpan.isOk(), E_FAIL);
119
119
 
120
120
    mParent = aParent;
121
121
    // mPeer is left null
138
138
    LogFlowThisFuncEnter();
139
139
 
140
140
    /* Enclose the state transition Ready->InUninit->NotReady */
141
 
    AutoUninitSpan autoUninitSpan (this);
 
141
    AutoUninitSpan autoUninitSpan(this);
142
142
    if (autoUninitSpan.uninitDone())
143
143
        return;
144
144
 
158
158
    if (!enabled)
159
159
        return E_POINTER;
160
160
 
161
 
    AutoCaller autoCaller (this);
162
 
    CheckComRCReturnRC (autoCaller.rc());
 
161
    AutoCaller autoCaller(this);
 
162
    CheckComRCReturnRC(autoCaller.rc());
163
163
 
164
 
    AutoReadLock alock (this);
 
164
    AutoReadLock alock(this);
165
165
 
166
166
    *enabled = mData->mLogoFadeIn;
167
167
 
170
170
 
171
171
STDMETHODIMP BIOSSettings::COMSETTER(LogoFadeIn)(BOOL enable)
172
172
{
173
 
    AutoCaller autoCaller (this);
174
 
    CheckComRCReturnRC (autoCaller.rc());
 
173
    AutoCaller autoCaller(this);
 
174
    CheckComRCReturnRC(autoCaller.rc());
175
175
 
176
176
    /* the machine needs to be mutable */
177
177
    Machine::AutoMutableStateDependency adep (mParent);
178
 
    CheckComRCReturnRC (adep.rc());
 
178
    CheckComRCReturnRC(adep.rc());
179
179
 
180
 
    AutoWriteLock alock (this);
 
180
    AutoWriteLock alock(this);
181
181
 
182
182
    mData.backup();
183
183
    mData->mLogoFadeIn = enable;
190
190
    if (!enabled)
191
191
        return E_POINTER;
192
192
 
193
 
    AutoCaller autoCaller (this);
194
 
    CheckComRCReturnRC (autoCaller.rc());
 
193
    AutoCaller autoCaller(this);
 
194
    CheckComRCReturnRC(autoCaller.rc());
195
195
 
196
 
    AutoReadLock alock (this);
 
196
    AutoReadLock alock(this);
197
197
 
198
198
    *enabled = mData->mLogoFadeOut;
199
199
 
202
202
 
203
203
STDMETHODIMP BIOSSettings::COMSETTER(LogoFadeOut)(BOOL enable)
204
204
{
205
 
    AutoCaller autoCaller (this);
206
 
    CheckComRCReturnRC (autoCaller.rc());
 
205
    AutoCaller autoCaller(this);
 
206
    CheckComRCReturnRC(autoCaller.rc());
207
207
 
208
208
    /* the machine needs to be mutable */
209
209
    Machine::AutoMutableStateDependency adep (mParent);
210
 
    CheckComRCReturnRC (adep.rc());
 
210
    CheckComRCReturnRC(adep.rc());
211
211
 
212
 
    AutoWriteLock alock (this);
 
212
    AutoWriteLock alock(this);
213
213
 
214
214
    mData.backup();
215
215
    mData->mLogoFadeOut = enable;
222
222
    if (!displayTime)
223
223
        return E_POINTER;
224
224
 
225
 
    AutoCaller autoCaller (this);
226
 
    CheckComRCReturnRC (autoCaller.rc());
 
225
    AutoCaller autoCaller(this);
 
226
    CheckComRCReturnRC(autoCaller.rc());
227
227
 
228
 
    AutoReadLock alock (this);
 
228
    AutoReadLock alock(this);
229
229
 
230
230
    *displayTime = mData->mLogoDisplayTime;
231
231
 
234
234
 
235
235
STDMETHODIMP BIOSSettings::COMSETTER(LogoDisplayTime)(ULONG displayTime)
236
236
{
237
 
    AutoCaller autoCaller (this);
238
 
    CheckComRCReturnRC (autoCaller.rc());
 
237
    AutoCaller autoCaller(this);
 
238
    CheckComRCReturnRC(autoCaller.rc());
239
239
 
240
240
    /* the machine needs to be mutable */
241
241
    Machine::AutoMutableStateDependency adep (mParent);
242
 
    CheckComRCReturnRC (adep.rc());
 
242
    CheckComRCReturnRC(adep.rc());
243
243
 
244
 
    AutoWriteLock alock (this);
 
244
    AutoWriteLock alock(this);
245
245
 
246
246
    mData.backup();
247
247
    mData->mLogoDisplayTime = displayTime;
254
254
    if (!imagePath)
255
255
        return E_POINTER;
256
256
 
257
 
    AutoCaller autoCaller (this);
258
 
    CheckComRCReturnRC (autoCaller.rc());
 
257
    AutoCaller autoCaller(this);
 
258
    CheckComRCReturnRC(autoCaller.rc());
259
259
 
260
 
    AutoReadLock alock (this);
 
260
    AutoReadLock alock(this);
261
261
 
262
262
    mData->mLogoImagePath.cloneTo(imagePath);
263
263
    return S_OK;
265
265
 
266
266
STDMETHODIMP BIOSSettings::COMSETTER(LogoImagePath)(IN_BSTR imagePath)
267
267
{
268
 
    /* empty strings are not allowed as path names */
269
 
    if (imagePath && !(*imagePath))
 
268
    /* NULL strings are not allowed */
 
269
    if (!imagePath)
270
270
        return E_INVALIDARG;
271
271
 
272
 
    AutoCaller autoCaller (this);
273
 
    CheckComRCReturnRC (autoCaller.rc());
 
272
    AutoCaller autoCaller(this);
 
273
    CheckComRCReturnRC(autoCaller.rc());
274
274
 
275
275
    /* the machine needs to be mutable */
276
276
    Machine::AutoMutableStateDependency adep (mParent);
277
 
    CheckComRCReturnRC (adep.rc());
 
277
    CheckComRCReturnRC(adep.rc());
278
278
 
279
 
    AutoWriteLock alock (this);
 
279
    AutoWriteLock alock(this);
280
280
 
281
281
    mData.backup();
282
282
    mData->mLogoImagePath = imagePath;
289
289
    if (!bootMenuMode)
290
290
        return E_POINTER;
291
291
 
292
 
    AutoCaller autoCaller (this);
293
 
    CheckComRCReturnRC (autoCaller.rc());
 
292
    AutoCaller autoCaller(this);
 
293
    CheckComRCReturnRC(autoCaller.rc());
294
294
 
295
 
    AutoReadLock alock (this);
 
295
    AutoReadLock alock(this);
296
296
 
297
297
    *bootMenuMode = mData->mBootMenuMode;
298
298
    return S_OK;
300
300
 
301
301
STDMETHODIMP BIOSSettings::COMSETTER(BootMenuMode)(BIOSBootMenuMode_T bootMenuMode)
302
302
{
303
 
    AutoCaller autoCaller (this);
304
 
    CheckComRCReturnRC (autoCaller.rc());
 
303
    AutoCaller autoCaller(this);
 
304
    CheckComRCReturnRC(autoCaller.rc());
305
305
 
306
306
    /* the machine needs to be mutable */
307
307
    Machine::AutoMutableStateDependency adep (mParent);
308
 
    CheckComRCReturnRC (adep.rc());
 
308
    CheckComRCReturnRC(adep.rc());
309
309
 
310
 
    AutoWriteLock alock (this);
 
310
    AutoWriteLock alock(this);
311
311
 
312
312
    mData.backup();
313
313
    mData->mBootMenuMode = bootMenuMode;
320
320
    if (!enabled)
321
321
        return E_POINTER;
322
322
 
323
 
    AutoCaller autoCaller (this);
324
 
    CheckComRCReturnRC (autoCaller.rc());
 
323
    AutoCaller autoCaller(this);
 
324
    CheckComRCReturnRC(autoCaller.rc());
325
325
 
326
 
    AutoReadLock alock (this);
 
326
    AutoReadLock alock(this);
327
327
 
328
328
    *enabled = mData->mACPIEnabled;
329
329
 
332
332
 
333
333
STDMETHODIMP BIOSSettings::COMSETTER(ACPIEnabled)(BOOL enable)
334
334
{
335
 
    AutoCaller autoCaller (this);
336
 
    CheckComRCReturnRC (autoCaller.rc());
 
335
    AutoCaller autoCaller(this);
 
336
    CheckComRCReturnRC(autoCaller.rc());
337
337
 
338
338
    /* the machine needs to be mutable */
339
339
    Machine::AutoMutableStateDependency adep (mParent);
340
 
    CheckComRCReturnRC (adep.rc());
 
340
    CheckComRCReturnRC(adep.rc());
341
341
 
342
 
    AutoWriteLock alock (this);
 
342
    AutoWriteLock alock(this);
343
343
 
344
344
    mData.backup();
345
345
    mData->mACPIEnabled = enable;
352
352
    if (!enabled)
353
353
        return E_POINTER;
354
354
 
355
 
    AutoCaller autoCaller (this);
356
 
    CheckComRCReturnRC (autoCaller.rc());
 
355
    AutoCaller autoCaller(this);
 
356
    CheckComRCReturnRC(autoCaller.rc());
357
357
 
358
 
    AutoReadLock alock (this);
 
358
    AutoReadLock alock(this);
359
359
 
360
360
    *enabled = mData->mIOAPICEnabled;
361
361
 
364
364
 
365
365
STDMETHODIMP BIOSSettings::COMSETTER(IOAPICEnabled)(BOOL enable)
366
366
{
367
 
    AutoCaller autoCaller (this);
368
 
    CheckComRCReturnRC (autoCaller.rc());
 
367
    AutoCaller autoCaller(this);
 
368
    CheckComRCReturnRC(autoCaller.rc());
369
369
 
370
370
    /* the machine needs to be mutable */
371
371
    Machine::AutoMutableStateDependency adep (mParent);
372
 
    CheckComRCReturnRC (adep.rc());
 
372
    CheckComRCReturnRC(adep.rc());
373
373
 
374
 
    AutoWriteLock alock (this);
 
374
    AutoWriteLock alock(this);
375
375
 
376
376
    mData.backup();
377
377
    mData->mIOAPICEnabled = enable;
384
384
    if (!enabled)
385
385
        return E_POINTER;
386
386
 
387
 
    AutoCaller autoCaller (this);
388
 
    CheckComRCReturnRC (autoCaller.rc());
 
387
    AutoCaller autoCaller(this);
 
388
    CheckComRCReturnRC(autoCaller.rc());
389
389
 
390
 
    AutoReadLock alock (this);
 
390
    AutoReadLock alock(this);
391
391
 
392
392
    *enabled = mData->mPXEDebugEnabled;
393
393
 
396
396
 
397
397
STDMETHODIMP BIOSSettings::COMSETTER(PXEDebugEnabled)(BOOL enable)
398
398
{
399
 
    AutoCaller autoCaller (this);
400
 
    CheckComRCReturnRC (autoCaller.rc());
 
399
    AutoCaller autoCaller(this);
 
400
    CheckComRCReturnRC(autoCaller.rc());
401
401
 
402
402
    /* the machine needs to be mutable */
403
403
    Machine::AutoMutableStateDependency adep (mParent);
404
 
    CheckComRCReturnRC (adep.rc());
 
404
    CheckComRCReturnRC(adep.rc());
405
405
 
406
 
    AutoWriteLock alock (this);
 
406
    AutoWriteLock alock(this);
407
407
 
408
408
    mData.backup();
409
409
    mData->mPXEDebugEnabled = enable;
416
416
    if (!offset)
417
417
        return E_POINTER;
418
418
 
419
 
    AutoCaller autoCaller (this);
420
 
    CheckComRCReturnRC (autoCaller.rc());
 
419
    AutoCaller autoCaller(this);
 
420
    CheckComRCReturnRC(autoCaller.rc());
421
421
 
422
 
    AutoReadLock alock (this);
 
422
    AutoReadLock alock(this);
423
423
 
424
424
    *offset = mData->mTimeOffset;
425
425
 
428
428
 
429
429
STDMETHODIMP BIOSSettings::COMSETTER(TimeOffset)(LONG64 offset)
430
430
{
431
 
    AutoCaller autoCaller (this);
432
 
    CheckComRCReturnRC (autoCaller.rc());
 
431
    AutoCaller autoCaller(this);
 
432
    CheckComRCReturnRC(autoCaller.rc());
433
433
 
434
434
    /* the machine needs to be mutable */
435
435
    Machine::AutoMutableStateDependency adep (mParent);
436
 
    CheckComRCReturnRC (adep.rc());
 
436
    CheckComRCReturnRC(adep.rc());
437
437
 
438
 
    AutoWriteLock alock (this);
 
438
    AutoWriteLock alock(this);
439
439
 
440
440
    mData.backup();
441
441
    mData->mTimeOffset = offset;
458
458
 *
459
459
 *  @note Locks this object for writing.
460
460
 */
461
 
HRESULT BIOSSettings::loadSettings (const settings::Key &aMachineNode)
 
461
HRESULT BIOSSettings::loadSettings(const settings::BIOSSettings &data)
462
462
{
463
 
    using namespace settings;
464
 
 
465
 
    AssertReturn (!aMachineNode.isNull(), E_FAIL);
466
 
 
467
 
    AutoCaller autoCaller (this);
468
 
    AssertComRCReturnRC (autoCaller.rc());
469
 
 
470
 
    AutoWriteLock alock (this);
471
 
 
472
 
    /* Note: we assume that the default values for attributes of optional
473
 
     * nodes are assigned in the Data::Data() constructor and don't do it
474
 
     * here. It implies that this method may only be called after constructing
475
 
     * a new BIOSSettings object while all its data fields are in the default
476
 
     * values. Exceptions are fields whose creation time defaults don't match
477
 
     * values that should be applied when these fields are not explicitly set
478
 
     * in the settings file (for backwards compatibility reasons). This takes
479
 
     * place when a setting of a newly created object must default to A while
480
 
     * the same setting of an object loaded from the old settings file must
481
 
     * default to B. */
482
 
 
483
 
    /* BIOS node (required) */
484
 
    Key biosNode = aMachineNode.key ("BIOS");
485
 
 
486
 
    /* ACPI (required) */
487
 
    {
488
 
        Key acpiNode = biosNode.key ("ACPI");
489
 
 
490
 
        mData->mACPIEnabled = acpiNode.value <bool> ("enabled");
491
 
    }
492
 
 
493
 
    /* IOAPIC (optional) */
494
 
    {
495
 
        Key ioapicNode = biosNode.findKey ("IOAPIC");
496
 
        if (!ioapicNode.isNull())
497
 
            mData->mIOAPICEnabled = ioapicNode.value <bool> ("enabled");
498
 
    }
499
 
 
500
 
    /* Logo (optional) */
501
 
    {
502
 
        Key logoNode = biosNode.findKey ("Logo");
503
 
        if (!logoNode.isNull())
504
 
        {
505
 
            mData->mLogoFadeIn = logoNode.value <bool> ("fadeIn");
506
 
            mData->mLogoFadeOut = logoNode.value <bool> ("fadeOut");
507
 
            mData->mLogoDisplayTime = logoNode.value <ULONG> ("displayTime");
508
 
            mData->mLogoImagePath = logoNode.stringValue ("imagePath");
509
 
        }
510
 
    }
511
 
 
512
 
    /* boot menu (optional) */
513
 
    {
514
 
        Key bootMenuNode = biosNode.findKey ("BootMenu");
515
 
        if (!bootMenuNode.isNull())
516
 
        {
517
 
            mData->mBootMenuMode = BIOSBootMenuMode_MessageAndMenu;
518
 
            const char *modeStr = bootMenuNode.stringValue ("mode");
519
 
 
520
 
            if (strcmp (modeStr, "Disabled") == 0)
521
 
                mData->mBootMenuMode = BIOSBootMenuMode_Disabled;
522
 
            else if (strcmp (modeStr, "MenuOnly") == 0)
523
 
                mData->mBootMenuMode = BIOSBootMenuMode_MenuOnly;
524
 
            else if (strcmp (modeStr, "MessageAndMenu") == 0)
525
 
                mData->mBootMenuMode = BIOSBootMenuMode_MessageAndMenu;
526
 
            else
527
 
                ComAssertMsgFailedRet (("Invalid boot menu mode '%s'", modeStr),
528
 
                                       E_FAIL);
529
 
        }
530
 
    }
531
 
 
532
 
    /* PXE debug logging (optional) */
533
 
    {
534
 
        Key pxedebugNode = biosNode.findKey ("PXEDebug");
535
 
        if (!pxedebugNode.isNull())
536
 
            mData->mPXEDebugEnabled = pxedebugNode.value <bool> ("enabled");
537
 
    }
538
 
 
539
 
    /* time offset (optional) */
540
 
    {
541
 
        Key timeOffsetNode = biosNode.findKey ("TimeOffset");
542
 
        if (!timeOffsetNode.isNull())
543
 
            mData->mTimeOffset = timeOffsetNode.value <LONG64> ("value");
544
 
    }
 
463
    AutoCaller autoCaller(this);
 
464
    AssertComRCReturnRC(autoCaller.rc());
 
465
 
 
466
    AutoWriteLock alock(this);
 
467
 
 
468
    mData->mACPIEnabled = data.fACPIEnabled;
 
469
    mData->mIOAPICEnabled = data.fIOAPICEnabled;
 
470
 
 
471
    mData->mLogoFadeIn = data.fLogoFadeIn;
 
472
    mData->mLogoFadeOut = data.fLogoFadeOut;
 
473
    mData->mLogoDisplayTime = data.ulLogoDisplayTime;
 
474
    mData->mLogoImagePath = data.strLogoImagePath;
 
475
 
 
476
    mData->mBootMenuMode = data.biosBootMenuMode;
 
477
 
 
478
    mData->mPXEDebugEnabled = data.fPXEDebugEnabled;
 
479
    mData->mTimeOffset = data.llTimeOffset;
545
480
 
546
481
    return S_OK;
547
482
}
553
488
 *
554
489
 *  @note Locks this object for reading.
555
490
 */
556
 
HRESULT BIOSSettings::saveSettings (settings::Key &aMachineNode)
 
491
HRESULT BIOSSettings::saveSettings(settings::BIOSSettings &data)
557
492
{
558
 
    using namespace settings;
559
 
 
560
 
    AssertReturn (!aMachineNode.isNull(), E_FAIL);
561
 
 
562
 
    AutoCaller autoCaller (this);
563
 
    AssertComRCReturnRC (autoCaller.rc());
564
 
 
565
 
    AutoReadLock alock (this);
566
 
 
567
 
    Key biosNode = aMachineNode.createKey ("BIOS");
568
 
 
569
 
    /* ACPI */
570
 
    {
571
 
        Key acpiNode = biosNode.createKey ("ACPI");
572
 
        acpiNode.setValue <bool> ("enabled", !!mData->mACPIEnabled);
573
 
    }
574
 
 
575
 
    /* IOAPIC */
576
 
    {
577
 
        Key ioapicNode = biosNode.createKey ("IOAPIC");
578
 
        ioapicNode.setValue <bool> ("enabled", !!mData->mIOAPICEnabled);
579
 
    }
580
 
 
581
 
    /* BIOS logo (optional) **/
582
 
    {
583
 
        Key logoNode = biosNode.createKey ("Logo");
584
 
        logoNode.setValue <bool> ("fadeIn", !!mData->mLogoFadeIn);
585
 
        logoNode.setValue <bool> ("fadeOut", !!mData->mLogoFadeOut);
586
 
        logoNode.setValue <ULONG> ("displayTime", mData->mLogoDisplayTime);
587
 
        logoNode.setValueOr <Bstr> ("imagePath", mData->mLogoImagePath, Bstr::Null);
588
 
    }
589
 
 
590
 
    /* boot menu (optional) */
591
 
    {
592
 
        Key bootMenuNode = biosNode.createKey ("BootMenu");
593
 
        const char *modeStr = NULL;
594
 
        switch (mData->mBootMenuMode)
595
 
        {
596
 
            case BIOSBootMenuMode_Disabled:
597
 
                modeStr = "Disabled";
598
 
                break;
599
 
            case BIOSBootMenuMode_MenuOnly:
600
 
                modeStr = "MenuOnly";
601
 
                break;
602
 
            case BIOSBootMenuMode_MessageAndMenu:
603
 
                modeStr = "MessageAndMenu";
604
 
                break;
605
 
            default:
606
 
                ComAssertMsgFailedRet (("Invalid boot menu type: %d",
607
 
                                        mData->mBootMenuMode),
608
 
                                       E_FAIL);
609
 
        }
610
 
        bootMenuNode.setStringValue ("mode", modeStr);
611
 
    }
612
 
 
613
 
    /* time offset (optional) */
614
 
    {
615
 
        Key timeOffsetNode = biosNode.createKey ("TimeOffset");
616
 
        timeOffsetNode.setValue <LONG64> ("value", mData->mTimeOffset);
617
 
    }
618
 
 
619
 
    /* PXE debug flag (optional) */
620
 
    {
621
 
        Key pxedebugNode = biosNode.createKey ("PXEDebug");
622
 
        pxedebugNode.setValue <bool> ("enabled", !!mData->mPXEDebugEnabled);
623
 
    }
 
493
    AutoCaller autoCaller(this);
 
494
    AssertComRCReturnRC(autoCaller.rc());
 
495
 
 
496
    AutoReadLock alock(this);
 
497
 
 
498
    data.fACPIEnabled = !!mData->mACPIEnabled;
 
499
    data.fIOAPICEnabled = !!mData->mIOAPICEnabled;
 
500
 
 
501
    data.fLogoFadeIn = !!mData->mLogoFadeIn;
 
502
    data.fLogoFadeOut = !!mData->mLogoFadeOut;
 
503
    data.ulLogoDisplayTime = mData->mLogoDisplayTime;
 
504
    data.strLogoImagePath = mData->mLogoImagePath;
 
505
 
 
506
    data.biosBootMenuMode = mData->mBootMenuMode;
 
507
    data.fPXEDebugEnabled = !!mData->mPXEDebugEnabled;
 
508
    data.llTimeOffset = mData->mTimeOffset;
624
509
 
625
510
    return S_OK;
626
511
}
628
513
void BIOSSettings::commit()
629
514
{
630
515
    /* sanity */
631
 
    AutoCaller autoCaller (this);
 
516
    AutoCaller autoCaller(this);
632
517
    AssertComRCReturnVoid (autoCaller.rc());
633
518
 
634
519
    /* sanity too */
656
541
    AssertReturnVoid (aThat != NULL);
657
542
 
658
543
    /* sanity */
659
 
    AutoCaller autoCaller (this);
 
544
    AutoCaller autoCaller(this);
660
545
    AssertComRCReturnVoid (autoCaller.rc());
661
546
 
662
547
    /* sanity too */
676
561
    AssertReturnVoid (aOsType != NULL);
677
562
 
678
563
    /* sanity */
679
 
    AutoCaller autoCaller (this);
 
564
    AutoCaller autoCaller(this);
680
565
    AssertComRCReturnVoid (autoCaller.rc());
681
566
 
682
 
    AutoWriteLock alock (this);
 
567
    AutoWriteLock alock(this);
683
568
 
684
569
    /* Initialize default BIOS settings here */
685
570
    mData->mIOAPICEnabled = aOsType->recommendedIOAPIC();