mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
vz: start using virDomainObjCheckActive
Signed-off-by: Clementine Hayat <clem@lse.epita.fr> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
b5997e3707
commit
5bf4ffc1f8
@ -3995,11 +3995,8 @@ vzDomainBlockResize(virDomainPtr domain,
|
||||
if (vzEnsureDomainExists(dom) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (!virDomainObjIsActive(dom)) {
|
||||
virReportError(VIR_ERR_OPERATION_INVALID,
|
||||
"%s", _("domain is not running"));
|
||||
if (virDomainObjCheckActive(dom) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (!(disk = virDomainDiskByName(dom->def, path, false))) {
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
|
Loading…
Reference in New Issue
Block a user