于 2011年08月22日 21:54, Eric Blake 写道:
On 08/22/2011 08:12 AM, Osier Yang wrote:
* src/qemu/qemu_monitor_text.c: Error like "this function is not
supported by the connection driver" is confused obviously.
---
src/qemu/qemu_monitor_text.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

ACK.

You are correct that VIR_ERR_NO_SUPPORT should only be used in libvirt.c, and not in any of the drivers.


# grep VIR_ERR_NO_SUPPORT * -r --exclude="libvirt.c" | grep -v '^Binary' | wc -l
115

Agree, seems we need to do a big cleanup.

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__);
return -1;
}

Osier

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to