[libvirt] [PATCH] qemu: nicer error message if live disk snapshot unsupported

Jiri Denemark jdenemar at redhat.com
Tue Dec 4 19:20:35 UTC 2012


On Tue, Dec 04, 2012 at 23:10:18 +0800, Osier Yang wrote:
> On 2012年12月04日 05:33, Eric Blake wrote:
...
> > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> > index 8e838cd..fbacd8b 100644
> > --- a/src/qemu/qemu_driver.c
> > +++ b/src/qemu/qemu_driver.c
> > @@ -11230,6 +11230,11 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
> >               virReportOOMError();
> >               goto cleanup;
> >           }
> > +    } else if (!qemuCapsGet(priv->caps, QEMU_CAPS_DISK_SNAPSHOT)) {
> > +        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> 
> Shouldn't this be VIR_ERR_OPERATION_INVALID instead? As it's not
> related with config.

The right code is actually VIR_ERR_OPERATION_UNSUPPORTED.

Jirka




More information about the libvir-list mailing list