Skip to content
  • Gerd Hoffmann's avatar
    switch chardev to QemuOpts: infrastructure, null device · 191bc01b
    Gerd Hoffmann authored
    
    
    start switching chardevs to QemuOpts.  This patch adds the
    infrastructure and converts the null device.
    
    The patch brings two new functions:
    
    qemu_chr_open_opts()
    	same as qemu_chr_open(), but uses QemuOpts instead of a
    	option char string.
    
    qemu_chr_parse_compat()
    	accepts a traditional chardev option string, returns the
    	corresponding QemuOpts instance, to handle backward
    	compatibility.
    
    The patch also adds a new -chardev switch which can be used to create
    named+unconnected chardevs, like this:
    
    	-chardev null,id=test
    
    This uses the new qemu_chr_open_opts.  Thus with this patch alone only
    the null device works.  The other devices will follow ...
    
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    191bc01b