~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/Frontends/VBoxBFE/VMControl.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:
61
61
    if (gConsole->inputGrabbed())
62
62
        gConsole->inputGrabEnd();
63
63
 
64
 
    PVMREQ pReq;
65
 
    int rcVBox = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
66
 
                             (PFNRT)VMR3Suspend, 1, pVM);
 
64
    int rcVBox = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)VMR3Suspend, 1, pVM);
67
65
    AssertRC(rcVBox);
68
 
    if (RT_SUCCESS(rcVBox))
69
 
    {
70
 
        rcVBox = pReq->iStatus;
71
 
        VMR3ReqFree(pReq);
72
 
    }
73
66
    return VINF_SUCCESS;
74
67
}
75
68
 
82
75
    if (machineState != VMSTATE_SUSPENDED)
83
76
        return VERR_VM_INVALID_VM_STATE;
84
77
 
85
 
    PVMREQ pReq;
86
 
    int rcVBox = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
87
 
                             (PFNRT)VMR3Resume, 1, pVM);
 
78
    int rcVBox = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)VMR3Resume, 1, pVM);
88
79
    AssertRC(rcVBox);
89
 
    if (RT_SUCCESS(rcVBox))
90
 
    {
91
 
        rcVBox = pReq->iStatus;
92
 
        VMR3ReqFree(pReq);
93
 
    }
94
80
    return VINF_SUCCESS;
95
81
}
96
82
 
100
86
int
101
87
VMCtrlReset(void)
102
88
{
103
 
    PVMREQ pReq;
104
 
    int rcVBox = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
105
 
                             (PFNRT)VMR3Reset, 1, pVM);
 
89
    int rcVBox = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)VMR3Reset, 1, pVM);
106
90
    AssertRC(rcVBox);
107
 
    if (RT_SUCCESS(rcVBox))
108
 
    {
109
 
        rcVBox = pReq->iStatus;
110
 
        VMR3ReqFree(pReq);
111
 
    }
112
 
 
113
91
    return VINF_SUCCESS;
114
92
}
115
93
 
154
132
 */
155
133
DECLCALLBACK(int) VMSaveThread(RTTHREAD Thread, void *pvUser)
156
134
{
157
 
    PVMREQ pReq;
158
135
    void (*pfnQuit)(void) = (void(*)(void))pvUser;
159
136
    int rc;
160
137
 
161
138
    startProgressInfo("Saving");
162
 
    rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
163
 
                     (PFNRT)VMR3Save, 4, pVM, g_pszStateFile, &callProgressInfo, (uintptr_t)NULL);
 
139
    rc = VMR3ReqCallWait(pVM, VMCPUID_ANY, 
 
140
                         (PFNRT)VMR3Save, 5, pVM, g_pszStateFile, false /*fContinueAftewards*/, &callProgressInfo, (uintptr_t)NULL);
 
141
    AssertRC(rc);
164
142
    endProgressInfo();
165
 
    if (RT_SUCCESS(rc))
166
 
    {
167
 
        rc = pReq->iStatus;
168
 
        VMR3ReqFree(pReq);
169
 
    }
170
143
    pfnQuit();
171
144
 
172
 
    return 0;
 
145
    return VINF_SUCCESS;
173
146
}
174
147
 
175
148
/*
191
164
 
192
165
    if (machineState == VMSTATE_RUNNING)
193
166
    {
194
 
        PVMREQ pReq;
195
 
        rc = VMR3ReqCall(pVM, VMCPUID_ANY, &pReq, RT_INDEFINITE_WAIT,
196
 
                         (PFNRT)VMR3Suspend, 1, pVM);
 
167
        rc = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)VMR3Suspend, 1, pVM);
197
168
        AssertRC(rc);
198
 
        if (RT_SUCCESS(rc))
199
 
        {
200
 
            rc = pReq->iStatus;
201
 
            VMR3ReqFree(pReq);
202
 
        }
203
169
    }
204
170
 
205
171
    RTTHREAD thread;