Skip to content
  • Gerd Hoffmann's avatar
    chardev: add socket chardev support to chardev-add (qmp) · f6bd5d6e
    Gerd Hoffmann authored
    
    
    qemu_chr_open_socket is split into two functions.  All initialization
    after creating the socket file handler is split away into the new
    qemu_chr_open_socket_fd function.
    
    chr->filename doesn't get filled from QemuOpts any more.  Qemu gathers
    the information using getsockname and getnameinfo instead.  This way it
    will also work correctly for file handles passed via file descriptor
    passing.
    
    Finally qmp_chardev_open_socket() is the actual qmp hotplug
    implementation which basically just calls socket_listen or
    socket_connect and the new qemu_chr_open_socket_fd function.
    
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    f6bd5d6e