~ubuntu-branches/ubuntu/vivid/virtualbox-ose/vivid

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2010-03-11 17:16:37 UTC
  • mfrom: (0.3.4 upstream) (0.4.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100311171637-43z64ia3ccpj8vqn
Tags: 3.1.4-dfsg-2ubuntu1
* Merge from Debian unstable (LP: #528561), remaining changes:
  - 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
  - Replace *-source packages with transitional packages for *-dkms
* Fix crash in vboxvideo_drm with kernel 2.6.33 / backported drm code
  (LP: #535297)
* Add a list of linux-headers packages to the apport hook
* Update debian/patches/u02-lp-integration.dpatch with a
  DEP-3 compliant header
* Add ${misc:Depends} to virtualbox-ose-source and virtualbox-ose-guest-source
  Depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
823
823
 
824
824
    for (size_t i = 0; i < ctrls.size(); ++ i)
825
825
    {
 
826
        DeviceType_T *paLedDevType = NULL;
 
827
 
826
828
        StorageControllerType_T enmCtrlType;
827
829
        rc = ctrls[i]->COMGETTER(ControllerType)(&enmCtrlType);                                 H();
828
830
        AssertRelease((unsigned)enmCtrlType < RT_ELEMENTS(aCtrlNodes));
866
868
                rc = CFGMR3InsertNode(pCtlInst, "LUN#999", &pLunL0);                            RC_CHECK();
867
869
                rc = CFGMR3InsertString(pLunL0, "Driver",               "MainStatus");          RC_CHECK();
868
870
                rc = CFGMR3InsertNode(pLunL0,   "Config", &pCfg);                               RC_CHECK();
869
 
                rc = CFGMR3InsertInteger(pCfg,  "papLeds", (uintptr_t)&pConsole->mapSCSILeds[0]); RC_CHECK();
 
871
                rc = CFGMR3InsertInteger(pCfg,  "papLeds", (uintptr_t)&pConsole->mapStorageLeds[iLedScsi]); RC_CHECK();
870
872
                rc = CFGMR3InsertInteger(pCfg,  "First",    0);                                 RC_CHECK();
 
873
                Assert(cLedScsi >= 16);
871
874
                rc = CFGMR3InsertInteger(pCfg,  "Last",     15);                                RC_CHECK();
 
875
                paLedDevType = &pConsole->maStorageDevType[iLedScsi];
872
876
                break;
873
877
            }
874
878
 
883
887
                rc = CFGMR3InsertNode(pCtlInst, "LUN#999", &pLunL0);                            RC_CHECK();
884
888
                rc = CFGMR3InsertString(pLunL0, "Driver",               "MainStatus");          RC_CHECK();
885
889
                rc = CFGMR3InsertNode(pLunL0,   "Config", &pCfg);                               RC_CHECK();
886
 
                rc = CFGMR3InsertInteger(pCfg,  "papLeds", (uintptr_t)&pConsole->mapSCSILeds[0]); RC_CHECK();
 
890
                rc = CFGMR3InsertInteger(pCfg,  "papLeds", (uintptr_t)&pConsole->mapStorageLeds[iLedScsi]); RC_CHECK();
887
891
                rc = CFGMR3InsertInteger(pCfg,  "First",    0);                                 RC_CHECK();
 
892
                Assert(cLedScsi >= 16);
888
893
                rc = CFGMR3InsertInteger(pCfg,  "Last",     15);                                RC_CHECK();
 
894
                paLedDevType = &pConsole->maStorageDevType[iLedScsi];
889
895
                break;
890
896
            }
891
897
 
926
932
                rc = CFGMR3InsertNode(pCtlInst, "LUN#999", &pLunL0);                            RC_CHECK();
927
933
                rc = CFGMR3InsertString(pLunL0, "Driver",               "MainStatus");          RC_CHECK();
928
934
                rc = CFGMR3InsertNode(pLunL0,   "Config", &pCfg);                               RC_CHECK();
929
 
                AssertRelease(cPorts <= RT_ELEMENTS(pConsole->mapSATALeds));
930
 
                rc = CFGMR3InsertInteger(pCfg,  "papLeds", (uintptr_t)&pConsole->mapSATALeds[0]); RC_CHECK();
 
935
                AssertRelease(cPorts <= cLedSata);
 
936
                rc = CFGMR3InsertInteger(pCfg,  "papLeds", (uintptr_t)&pConsole->mapStorageLeds[iLedSata]); RC_CHECK();
931
937
                rc = CFGMR3InsertInteger(pCfg,  "First",    0);                                 RC_CHECK();
932
938
                rc = CFGMR3InsertInteger(pCfg,  "Last",     cPorts - 1);                        RC_CHECK();
 
939
                paLedDevType = &pConsole->maStorageDevType[iLedSata];
933
940
                break;
934
941
            }
935
942
 
950
957
                rc = CFGMR3InsertNode(pCtlInst,    "LUN#999", &pLunL0);                         RC_CHECK();
951
958
                rc = CFGMR3InsertString(pLunL0, "Driver",               "MainStatus");          RC_CHECK();
952
959
                rc = CFGMR3InsertNode(pLunL0,   "Config", &pCfg);                               RC_CHECK();
953
 
                rc = CFGMR3InsertInteger(pCfg,  "papLeds", (uintptr_t)&pConsole->mapIDELeds[0]);RC_CHECK();
 
960
                rc = CFGMR3InsertInteger(pCfg,  "papLeds", (uintptr_t)&pConsole->mapStorageLeds[iLedIde]); RC_CHECK();
954
961
                rc = CFGMR3InsertInteger(pCfg,  "First",    0);                                 RC_CHECK();
 
962
                Assert(cLedIde >= 4);
955
963
                rc = CFGMR3InsertInteger(pCfg,  "Last",     3);                                 RC_CHECK();
 
964
                paLedDevType = &pConsole->maStorageDevType[iLedIde];
956
965
 
957
966
                /* IDE flavors */
958
967
                aCtrlNodes[StorageControllerType_PIIX3] = pDev;
976
985
                rc = CFGMR3InsertNode(pCtlInst, "LUN#999", &pLunL0);                            RC_CHECK();
977
986
                rc = CFGMR3InsertString(pLunL0, "Driver",               "MainStatus");          RC_CHECK();
978
987
                rc = CFGMR3InsertNode(pLunL0,   "Config", &pCfg);                               RC_CHECK();
979
 
                rc = CFGMR3InsertInteger(pCfg,  "papLeds", (uintptr_t)&pConsole->mapFDLeds[0]); RC_CHECK();
 
988
                rc = CFGMR3InsertInteger(pCfg,  "papLeds", (uintptr_t)&pConsole->mapStorageLeds[iLedFloppy]); RC_CHECK();
980
989
                rc = CFGMR3InsertInteger(pCfg,  "First",    0);                                 RC_CHECK();
 
990
                Assert(cLedFloppy >= 1);
981
991
                rc = CFGMR3InsertInteger(pCfg,  "Last",     0);                                 RC_CHECK();
 
992
                paLedDevType = &pConsole->maStorageDevType[iLedFloppy];
982
993
                break;
983
994
            }
984
995
 
1118
1129
                            {
1119
1130
                                Utf8Str name = names[ii];
1120
1131
                                Utf8Str value = values[ii];
1121
 
                                rc = CFGMR3InsertString(pVDC, name.c_str(), value.c_str()); AssertRC(rc); /** @todo r=bird: why not RC_CHECK() here? (I added the AssertRC.)*/
 
1132
                                rc = CFGMR3InsertString(pVDC, name.c_str(), value.c_str());     RC_CHECK();
1122
1133
                                if (    name.compare("HostIPStack") == 0
1123
1134
                                    &&  value.compare("0") == 0)
1124
1135
                                    fHostIP = false;
1157
1168
                            rc = CFGMR3InsertNode(pCur, "VDConfig", &pVDC);                     RC_CHECK();
1158
1169
                            for (size_t ii = 0; ii < aNames.size(); ++ii)
1159
1170
                            {
1160
 
                                if (aValues[ii])
 
1171
                                if (aValues[ii] && *aValues[ii])
1161
1172
                                {
1162
1173
                                    Utf8Str name = aNames[ii];
1163
1174
                                    Utf8Str value = aValues[ii];
1164
 
                                    rc = CFGMR3InsertString(pVDC, name.c_str(), value.c_str()); AssertRC(rc); /** @todo r=bird: why not RC_HCECK here? (I added the AssertRC.)*/
 
1175
                                    rc = CFGMR3InsertString(pVDC, name.c_str(), value.c_str()); RC_CHECK();
1165
1176
                                    if (    name.compare("HostIPStack") == 0
1166
1177
                                        &&  value.compare("0") == 0)
1167
1178
                                        fHostIP = false;
1182
1193
                    }
1183
1194
                }
1184
1195
            }
 
1196
 
 
1197
            if (paLedDevType)
 
1198
                paLedDevType[uLUN] = lType;
1185
1199
        }
1186
1200
        H();
1187
1201
    }