[libvirt] [PATCH 2/6] virDomain{Get, Set}PerfEvents: Add @flags argument

Peter Krempa pkrempa at redhat.com
Thu Mar 31 07:42:17 UTC 2016


On Thu, Mar 31, 2016 at 07:28:57 +0200, Michal Privoznik wrote:
> I've noticed that these APIs are missing @flags argument. Even
> though we don't have a use for them, it's our policy that every
> new API must have @flags.
> 
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
>  daemon/remote.c                  |  2 +-
>  include/libvirt/libvirt-domain.h |  6 ++++--
>  src/driver-hypervisor.h          |  6 ++++--
>  src/libvirt-domain.c             | 22 ++++++++++++++--------
>  src/qemu/qemu_driver.c           | 11 ++++++++---
>  src/remote/remote_driver.c       |  4 +++-
>  src/remote/remote_protocol.x     |  2 ++
>  tools/virsh-domain.c             |  5 +++--
>  8 files changed, 39 insertions(+), 19 deletions(-)
> 


>  struct remote_domain_get_perf_events_ret {
> diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
> index cda442d..a105268 100644
> --- a/tools/virsh-domain.c
> +++ b/tools/virsh-domain.c
> @@ -8610,6 +8610,7 @@ cmdPerf(vshControl *ctl, const vshCmd *cmd)
>      virTypedParameterPtr params = NULL;
>      bool ret = false;
>      const char *enable = NULL, *disable = NULL;
> +    unsigned int flags = VIR_DOMAIN_AFFECT_CURRENT;

There is no such flag option currently, you should pass 0. (I know that
VIR_DOMAIN_AFFECT_CURRENT is actually equal to 0, but in the context of
this patch you are stating that there are no supported flags.)

>  
>      if (!(dom = virshCommandOptDomain(ctl, cmd, NULL)))
>          return false;

ACK, disregard my above statement. Fixing the 'unpleasant' code is more
important at this point.

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160331/958a5299/attachment-0001.sig>


More information about the libvir-list mailing list