On Tue, Oct 02, 2018 at 16:14:44 +0200, Andrea Bolognani wrote: > In this case we want to deprecate the API wholesale, so we > can simply report a warning in the public entry point. > > Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx> > --- > src/libvirt-domain.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c > index 7690339521..a758539b6d 100644 > --- a/src/libvirt-domain.c > +++ b/src/libvirt-domain.c > @@ -97,6 +97,11 @@ virConnectNumOfDomains(virConnectPtr conn) > int ret = conn->driver->connectNumOfDomains(conn); > if (ret < 0) > goto error; > + > + virReportWarning(VIR_ERR_DEPRECATED_FEATURE, > + "%s", > + "virConnectNumOfDomains()"); > + virDispatchError(conn); I don't think our API contract allows for reporting an error AND returning success. And even if we didn't specify it it's pretty much assumed right now, so I'm not in support of this. > return ret; > } > > -- > 2.17.1 > > -- > libvir-list mailing list > libvir-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/libvir-list -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list