• L
    virsh: rework command parsing · a2943243
    Lai Jiangshan 提交于
    Old virsh command parsing mashes all the args back into a string and
    miss the quotes, this patches fix it. It is also needed for introducing
    qemu-monitor-command which is very useful.
    
    This patches uses the new vshCommandParser abstraction and adds
    vshCommandArgvParse() for arguments vector, so we don't need
    to mash arguments vector into a command sting.
    
    And the usage was changed:
    old:
    virsh [options] [commands]
    
    new:
    virsh [options]... [<command_string>]
    virsh [options]... <command> [args...]
    
    So we still support commands like:
    "define D.xml; dumpxml D" was parsed as a commands-string.
    
    and support commands like:
    we will not mash them into a string, we use new argv parser for it.
    
    But we don't support the command like:
    "define D.xml; dumpxml" was parsed as a command-name, but we have no such command-name.
    Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
    a2943243
virsh.pod 36.5 KB