[libvirt] [PATCH v2 00/12] Some fixes and improvement for virsh completion in non interactive mode

Lin Ma lma at suse.com
Tue May 8 14:20:28 UTC 2018


This patch series is about some fixes and improvement for virsh completion
in non interactive mode.

Some of them probably don't make sense, I sent them out for suggestions.

v2->v1:
* Add a new patch for centralize the definition of macro VIRSH_COMMON_OPT_DOMAIN_FULL to virsh.h

* rename the helper function from virDomainEventGetName virshDomainEventGetName
Follow Peter Krempa's suggestion:

* Drop the original patch#10 which about introduce some VIR_DOMAIN_EVENT_* macros

* code formatting fix

* centralize the definition of macro VIRSH_COMMON_OPT_DOMAIN_OT_STRING_FULL

* centralize the definition of macro VIRSH_COMMON_OPT_DOMAIN_OT_ARGV_FULL

* refactor some code in patch#10 for using same array, handle the case when
'--event' and '--all' are provided together through command line.

* Due to the helper function is only used for virsh, unnecessary to be publiced,
I move it from src/conf/domain_event.c to tools/virsh-util.c



Lin Ma (12):
  virsh: Move the definition of macro VIRSH_COMMON_OPT_DOMAIN_FULL to
    virsh.h
  virsh: Add domain name completion to 'migrate-postcopy' command
  virsh: Conditionally Ignore the first entry in list of completions
  virsh: Create macros for VSH_OT_STRING "domain" option
  virsh: Apply macro for current VSH_OT_STRING "domain" options
  vshReadlineParse: Ignore vshReadlineOptionsGenerator for VSH_OT_ARGV
    options
  virsh: Create macros for VSH_OT_ARGV "domain" option
  virsh: Apply macro for current VSH_OT_ARGV "domain" options
  vshReadlineOptionsGenerator: Add already provided VSH_OT_ARGV options
    to list
  virsh: Enable multiple --event flags to 'event' command
  virsh: add helper for returning event name string
  virsh: Add event name completion to 'event' command

 tools/virsh-completer.c      |  37 ++++++++++++
 tools/virsh-completer.h      |   3 +
 tools/virsh-domain-monitor.c |   9 +--
 tools/virsh-domain.c         | 135 ++++++++++++++++++++-----------------------
 tools/virsh-snapshot.c       |   3 -
 tools/virsh-util.c           |  60 +++++++++++++++++++
 tools/virsh-util.h           |   3 +
 tools/virsh.h                |  26 +++++++++
 tools/vsh.c                  |  12 +++-
 9 files changed, 203 insertions(+), 85 deletions(-)

-- 
2.15.1




More information about the libvir-list mailing list