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:
Clementine Hayat 2018-04-17 22:13:34 +00:00 committed by Ján Tomko
parent b5997e3707
commit 5bf4ffc1f8

View File

@ -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,