• E
    qemu: avoid adding "" in smbios arguments · 575914cf
    Eric Blake 提交于
    The log lists things like -smbios type=1,vendor="Red Hat", which
    is great for shell parsing, but not so great when you realize that
    execve() then passes those literal "" on as part of the command
    line argument, such that qemu sets SMBIOS with extra literal quotes.
    
    The eventual addition of virCommand is needed before we have the API
    to shell-quote a string representation of a command line, so that the
    log can still be pasted into a shell, but without inserting extra
    bytes into the execve() arguments.
    
    * src/qemu/qemu_conf.c (qemuBuildSmbiosBiosStr)
    (qemuBuildSmbiosSystemStr): Qemu doesn't like quotes around uuid
    arguments, and the remaining quotes are passed literally to
    smbios, making <smbios mode='host'/> inaccurate.  Removing the
    quotes makes the log harder to parse, but that can be fixed later
    with virCommand improvements.
    * tests/qemuxml2argvdata/qemuxml2argv-smbios.args: 'Fix' test; it
    will need fixing again once virCommand learns how to shell-quote a
    potential command line.
    575914cf
qemu_conf.c 218.9 KB