a7bc2c8 Generate unique socket file

2 files Authored by Scott Garfinkle 6 years ago, Committed by mkletzan 6 years ago,
    Generate unique socket file
    
    It's possible to have more than one unnamed virtio-serial unix channel.
    We need to generate a unique name for each channel. Currently, we use
    ".../unknown.sock" for all of them. Better practice would be to specify
    an explicit target path name; however, in the absence of that, we need
    uniqueness in the names we generate internally.
    
    Before the changes we'd get /var/lib/libvirt/qemu/channel/target/unknown.sock
    for each instance of
        <channel type='unix'>
            <source mode='bind'/>
            <target type='virtio'/>
        </channel>
    
    Now, we get vioser-00-00-01.sock, vioser-00-00-02.sock, etc.
    
    Signed-off-by: Scott Garfinkle <seg@us.ibm.com>
    
        
file modified
+17 -7