[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] qemu: Substitute VIR_ERR_NO_SUPPORT with VIR_ERR_OPERATION_INVALID

于 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(-)


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

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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]