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

« back to all changes in this revision

Viewing changes to src/VBox/Frontends/VBoxBFE/VBoxBFE.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:
332
332
/**
333
333
 * Update progress display.
334
334
 */
335
 
void callProgressInfo(PVM pVM, unsigned uPercent, void *pvUser)
 
335
int callProgressInfo(PVM pVM, unsigned uPercent, void *pvUser)
336
336
{
337
337
    if (gConsole)
338
338
        gConsole->progressInfo(pVM, uPercent, pvUser);
 
339
    return VINF_SUCCESS;
339
340
}
340
341
 
341
342
/**
660
661
                return SyntaxError("The network MAC address has an invalid length: %s (%s)\n", pszMac, pszArg);
661
662
            for (unsigned j = 0; j < RT_ELEMENTS(g_aNetDevs[i].Mac.au8); j++)
662
663
            {
663
 
                char c1 = toupper(*pszMac++) - '0';
 
664
                char c1 = RT_C_TO_UPPER(*pszMac++) - '0';
664
665
                if (c1 > 9)
665
666
                    c1 -= 7;
666
 
                char c2 = toupper(*pszMac++) - '0';
 
667
                char c2 = RT_C_TO_UPPER(*pszMac++) - '0';
667
668
                if (c2 > 9)
668
669
                    c2 -= 7;
669
670
                if (c2 > 16 || c1 > 16)
964
965
        if (machineState != VMSTATE_OFF)
965
966
        {
966
967
            /* Power off VM */
967
 
            PVMREQ pReq;
968
 
            rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOff, 1, pVM);
 
968
            rc = VMR3PowerOff(pVM);
 
969
            AssertRC(rc);
969
970
        }
970
971
 
971
972
        /* And destroy it */
1269
1270
     */
1270
1271
    if (RT_SUCCESS(rc))
1271
1272
    {
1272
 
        PVMREQ pReq;
1273
 
 
1274
1273
        if (   g_fRestoreState
1275
1274
            && g_pszStateFile
1276
1275
            && *g_pszStateFile
1277
1276
            && RTPathExists(g_pszStateFile))
1278
1277
        {
1279
1278
            startProgressInfo("Restoring");
1280
 
            rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
1281
 
                             (PFNRT)VMR3Load, 4, pVM, g_pszStateFile, &callProgressInfo, (uintptr_t)NULL);
 
1279
            rc = VMR3LoadFromFile(pVM, g_pszStateFile, callProgressInfo, (uintptr_t)NULL);
1282
1280
            endProgressInfo();
1283
1281
            if (RT_SUCCESS(rc))
1284
1282
            {
1285
 
                VMR3ReqFree(pReq);
1286
 
                rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
1287
 
                                 (PFNRT)VMR3Resume, 1, pVM);
1288
 
                if (RT_SUCCESS(rc))
1289
 
                {
1290
 
                    rc = pReq->iStatus;
1291
 
                    VMR3ReqFree(pReq);
1292
 
                }
 
1283
                rc = VMR3Resume(pVM);
 
1284
                AssertRC(rc);
1293
1285
                gDisplay->setRunning();
1294
1286
            }
1295
1287
            else
1296
 
                AssertMsgFailed(("VMR3Load failed, rc=%Rrc\n", rc));
 
1288
                AssertMsgFailed(("VMR3LoadFromFile failed, rc=%Rrc\n", rc));
1297
1289
        }
1298
1290
        else
1299
1291
        {
1300
 
            rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT, (PFNRT)VMR3PowerOn, 1, pVM);
1301
 
            if (RT_SUCCESS(rc))
1302
 
            {
1303
 
                rc = pReq->iStatus;
1304
 
                AssertRC(rc);
1305
 
                VMR3ReqFree(pReq);
1306
 
            }
1307
 
            else
 
1292
            rc = VMR3PowerOn(pVM);
 
1293
            if (RT_FAILURE(rc))
1308
1294
                AssertMsgFailed(("VMR3PowerOn failed, rc=%Rrc\n", rc));
1309
1295
        }
1310
1296
    }