• M
    vshCommandOpt: Do more checking if skipChecks is set · 846d3b58
    Michal Privoznik 提交于
    Currently if cmd->skipChecks is set (done only from completers)
    some basic checks are skipped because we're working over
    partially parsed command. See a26ff63a for more detailed
    explanation. Anyway, the referenced commit was too aggressive in
    disabling checks and effectively returned success even in clear
    case of failure. For instance:
    
      # domif-getlink --interface <TAB><TAB>
    
    causes virshDomainInterfaceCompleter() to be called, which calls
    virshDomainGetXML() which eventually calls
    vshCommandOptStringReq(.., name = "domain"); The --domain
    argument is required for the command and if not present -1 should
    be returned to tell the caller the argument was not found. Well,
    zero is returned meaning the argument was not found but it's not
    required either.
    Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
    846d3b58
vsh.c 89.5 KB