[libvirt] [PATCH] virsh: fix build without readline
bogorodskiy at gmail.com
Sat Jan 13 14:48:53 UTC 2018
John Ferlan wrote:
> On 01/13/2018 02:00 AM, Roman Bogorodskiy wrote:
> > Completion in virsh is enabled when readline is available. However,
> > when it's not available, we should:
> > * avoid defining completers with completion functions;
> > * in cmdComplete(), mark unused arguments when there's no readline with
> > ATTRIBUTE_UNUSED.
> > ---
> > tools/virsh-domain-monitor.c | 6 ++++++
> > tools/virsh-domain.c | 6 ++++++
> > tools/virsh.h | 11 ++++++++++-
> > tools/virt-admin.c | 14 ++++++++++++++
> > tools/vsh.c | 2 +-
> > 5 files changed, 37 insertions(+), 2 deletions(-)
> Any chance to reduce the number of places to change that we can modify
> virsh-completer.c to have the "#if WITH_READLINE" where the #else would
> just return NULL and uses virCheckFlags(-1, NULL); to avoid the
> syntax-check issue for the two API's defined so far?
> Reading vshReadlineParse it seems as if the .completer returns NULL,
> then it's no different than if the .completer was NULL.
> I'm only one cup of coffee in though - so I could be wrong ;-). It
> would have been "better" if the two new API's came with some
> documentation over usage expectations (grumble, grumble).
Sent out v2. Brief testings shows virsh working as usual with this
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 455 bytes
Desc: not available
More information about the libvir-list