On 08/22/2011 08:50 AM, Osier Yang wrote:
But seems it's fine for funcs like below to use that? int virSecurityManagerSetAllLabel(virSecurityManagerPtr mgr, virDomainObjPtr vm, const char *stdin_path) { if (mgr->drv->domainSetSecurityAllLabel) return mgr->drv->domainSetSecurityAllLabel(mgr, vm, stdin_path); virSecurityReportError(VIR_ERR_NO_SUPPORT, __FUNCTION__);
Uses like this are fine. That is, VIR_ERR_NO_SUPPORT is for use by managers (libvirt.c is a manager, but so is virSecurityManagerSetAllLabel) to report that a function callback is not supported by a driver. Where it is not okay is within a driver (either the driver implemented the callback, so there is no error to report, or the driver does not implement the callback, so the manager already reported the error).
-- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list