[libvirt] [PATCH 2/3] change virDomainObjIsActive with virDomainObjCheckIsActive
Jim Fehlig
jfehlig at suse.com
Tue Feb 28 18:40:59 UTC 2017
On 02/24/2017 01:03 AM, Sagar Ghuge wrote:
> Signed-off-by: Sagar Ghuge <ghugesss at gmail.com>
> ---
> src/test/test_driver.c | 35 +++++++----------------------------
> 1 file changed, 7 insertions(+), 28 deletions(-)
The commit summary here should be prefixed with 'test'. E.g.
test: Use virDomainObjCheckIsActive
>
> diff --git a/src/test/test_driver.c b/src/test/test_driver.c
> index 5fef3f1..bbcaa44 100644
> --- a/src/test/test_driver.c
> +++ b/src/test/test_driver.c
> @@ -1769,11 +1769,8 @@ static int testDomainDestroy(virDomainPtr domain)
> if (!(privdom = testDomObjFromDomain(domain)))
> goto cleanup;
>
> - if (!virDomainObjIsActive(privdom)) {
> - virReportError(VIR_ERR_OPERATION_INVALID,
> - "%s", _("domain is not running"));
> + if (virDomainObjCheckIsActive(privdom) < 0)
If you change virDomainObjCheckIsActive to return a bool, you'll need to change
all of these to
if (!virDomainObjCheckIsActive(privdom))
Otherwise looking good.
Regards,
Jim
More information about the libvir-list
mailing list