• P
    qemu: command: Generate -netdev command line via JSON->cmdline conversion · b6738ffc
    Peter Krempa 提交于
    The 'netdev_add' command was recently formally described in qemu via the
    QMP schema. This means that it also requires the arguments to be
    properly formatted. Our current approach is to generate the command line
    and then use qemuMonitorJSONKeywordStringToJSON to get the JSON
    properties for the monitor. This will not work if we need to pass some
    fields as numbers or booleans.
    
    In this step we re-do internals of qemuBuildHostNetStr to format a JSON
    object which is converted back via virQEMUBuildNetdevCommandlineFromJSON
    to the equivalent command line. This will later allow fixing of the
    monitor code to use the JSON object directly rather than rely on the
    conversion.
    Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
    Reviewed-by: NEric Blake <eblake@redhat.com>
    b6738ffc
qemu_command.c 336.8 KB