提交 66aa7e02 编写于 作者: M Michal Privoznik

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: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NErik Skultety <eskultet@redhat.com>
上级 98bc781b
......@@ -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 */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册