[PATCH] virsh: Add virshKeycodeNameCompleter

Ján Tomko jtomko at redhat.com
Fri Feb 19 06:40:13 UTC 2021


On a Thursday in 2021, Kristina Hanicova wrote:
>Signed-off-by: Kristina Hanicova <khanicov at redhat.com>
>---
> tools/virsh-completer-domain.c | 72 ++++++++++++++++++++++++++++++++++
> tools/virsh-completer-domain.h |  8 +++-
> tools/virsh-domain.c           |  1 +
> 3 files changed, 79 insertions(+), 2 deletions(-)
>
>diff --git a/tools/virsh-completer-domain.h b/tools/virsh-completer-domain.h
>index 4c01b0ca1f..04a3705ff9 100644
>--- a/tools/virsh-completer-domain.h
>+++ b/tools/virsh-completer-domain.h
>@@ -112,5 +112,9 @@ char ** virshDomainLifecycleActionCompleter(vshControl *ctl,
>                                             unsigned int flags);
>
> char ** virshCodesetNameCompleter(vshControl *ctl,
>-                              const vshCmd *cmd,
>-                              unsigned int flags);
>+                                  const vshCmd *cmd,
>+                                  unsigned int flags);
>+

This indentation change is not related to the rest of the commit,
so I split it out into a separate commit before pushing.

>+char ** virshKeycodeNameCompleter(vshControl *ctl,
>+                                  const vshCmd *cmd,
>+                                  unsigned int flags);
>diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
>index d40995f44d..df33467646 100644
>--- a/tools/virsh-domain.c
>+++ b/tools/virsh-domain.c
>@@ -8802,6 +8802,7 @@ static const vshCmdOptDef opts_send_key[] = {
>     {.name = "keycode",
>      .type = VSH_OT_ARGV,
>      .flags = VSH_OFLAG_REQ,
>+     .completer = virshKeycodeNameCompleter,
>      .help = N_("the key code")
>     },
>     {.name = NULL}
>-- 
>2.29.2
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20210219/65b77944/attachment-0001.sig>


More information about the libvir-list mailing list