• E
    virsh: improve blockcopy UI · 17840379
    Eric Blake 提交于
    Peter's review of an early version of my addition of active block
    commit pointed out some issues that I was copying from the block
    copy code; fix them up now before perpetuating them.
    
    For virsh commands that manage a single API call, it's nice to have
    a 1:1 mapping of options to flags, so that we can test that
    lower-layer software handles flag combinations correctly.  But where
    virsh is introducing syntactic sugar to combine multiple API calls
    into a single user interface, we might as well make that interface
    compact.  That is, we should allow the shorter command-line of
    'blockcopy $dom $disk --pivot' without having to explicitly specify
    --wait, because this isn't directly a flag passed to a single
    underlying API call.
    
    Also, my use of embedded ?: ternaries bordered on unreadable.
    
    * tools/virsh-domain.c (cmdBlockCopy): Make --pivot, --finish,
    and --timeout imply --wait. Drop excess ?: operators.
    * tools/virsh.pod (blockcopy): Update documentation.
    Signed-off-by: NEric Blake <eblake@redhat.com>
    17840379
virsh.pod 151.4 KB