Re: [PATCH 1/3] virsh: Provide completer for virtualization types

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

 



On 4/2/22 12:31, Amneesh Singh wrote:
> Related: https://gitlab.com/libvirt/libvirt/-/issues/9
> Signed-off-by: Amneesh Singh <natto@xxxxxxxxxxxxx>
> ---
>  tools/virsh-completer-host.c | 12 ++++++++++++
>  tools/virsh-completer-host.h |  5 +++++
>  tools/virsh-host.c           |  4 ++++
>  3 files changed, 21 insertions(+)
> 
> diff --git a/tools/virsh-completer-host.c b/tools/virsh-completer-host.c
> index cbdc3f0..14c68d3 100644
> --- a/tools/virsh-completer-host.c
> +++ b/tools/virsh-completer-host.c
> @@ -27,6 +27,7 @@
>  #include "virxml.h"
>  #include "virutil.h"
>  #include "virsh-host.h"
> +#include "conf/domain_conf.h"
>  
>  static char *
>  virshPagesizeNodeToString(xmlNodePtr node)
> @@ -180,3 +181,14 @@ virshNodeSuspendTargetCompleter(vshControl *ctl G_GNUC_UNUSED,
>      return virshEnumComplete(VIR_NODE_SUSPEND_TARGET_LAST,
>                               virshNodeSuspendTargetTypeToString);
>  }
> +
> +char **

Notice how the rest of the file uses two empty lines to separate
functions? It's easier to spot the function you're looking for when
scrolling through file that way.

> +virshVirtTypeCompleter(vshControl *ctl G_GNUC_UNUSED,
> +                       const vshCmd *cmd G_GNUC_UNUSED,
> +                       unsigned int flags)
> +{
> +    virCheckFlags(0, NULL);
> +
> +    return virshEnumComplete(VIR_DOMAIN_VIRT_LAST,
> +                             virDomainVirtTypeToString);
> +}

Michal




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux