parent
99db9e5246
commit
6974abcf41
|
@ -928,13 +928,17 @@ void Thread::_call_run_vm()
|
||||||
void Thread::_call_pause_vm()
|
void Thread::_call_pause_vm()
|
||||||
{
|
{
|
||||||
/* check permissions */
|
/* check permissions */
|
||||||
assert(_core());
|
if (!_core()) {
|
||||||
|
PWRN("not entitled to pause virtual machine");
|
||||||
/* get targeted vm via its id */
|
return;
|
||||||
|
}
|
||||||
|
/* lookup virtual machine */
|
||||||
Vm * const vm = Vm::pool()->object(user_arg_1());
|
Vm * const vm = Vm::pool()->object(user_arg_1());
|
||||||
assert(vm);
|
if (!vm) {
|
||||||
|
PWRN("failed to lookup virtual machine");
|
||||||
/* pause targeted vm */
|
return;
|
||||||
|
}
|
||||||
|
/* pause virtual machine */
|
||||||
vm->pause();
|
vm->pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user