mirror of https://gitee.com/openkylin/libvirt.git
vsh: Provide cmdComplete stub for readline disabled builds
When building without readline, this function does nothing but return false. Without touching any of its arguments which triggers a build error. Therefore, provide a stub that has arguments marked as unused. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
98bc781b42
commit
66aa7e02c6
16
tools/vsh.c
16
tools/vsh.c
|
@ -3457,11 +3457,12 @@ const vshCmdInfo info_complete[] = {
|
|||
{.name = NULL}
|
||||
};
|
||||
|
||||
|
||||
#ifdef WITH_READLINE
|
||||
bool
|
||||
cmdComplete(vshControl *ctl, const vshCmd *cmd)
|
||||
{
|
||||
bool ret = false;
|
||||
#ifdef WITH_READLINE
|
||||
const vshClientHooks *hooks = ctl->hooks;
|
||||
int stdin_fileno = STDIN_FILENO;
|
||||
const char *arg = "";
|
||||
|
@ -3510,6 +3511,17 @@ cmdComplete(vshControl *ctl, const vshCmd *cmd)
|
|||
cleanup:
|
||||
virBufferFreeAndReset(&buf);
|
||||
virStringListFree(matches);
|
||||
#endif /* WITH_READLINE */
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
#else /* !WITH_READLINE */
|
||||
|
||||
|
||||
bool
|
||||
cmdComplete(vshControl *ctl ATTRIBUTE_UNUSED,
|
||||
const vshCmd *cmd ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif /* !WITH_READLINE */
|
||||
|
|
Loading…
Reference in New Issue