26c14be qemuDomainCreateDeviceRecursive: pass a structure instead of bare path

Authored and Committed by mprivozn 6 years ago
    qemuDomainCreateDeviceRecursive: pass a structure instead of bare path
    
    Currently, all we need to do in qemuDomainCreateDeviceRecursive() is to
    take given @device, get all kinds of info on it (major & minor numbers,
    owner, seclabels) and create its copy at a temporary location @path
    (usually /var/run/libvirt/qemu/$domName.dev), if @device live under
    /dev. This is, however, very loose condition, as it also means
    /dev/shm/* is created too. Therefor, we will need to pass more arguments
    into the function for better decision making (e.g. list of mount points
    under /dev). Instead of adding more arguments to all the functions (not
    easily reachable because some functions are callback with strictly
    defined type), lets just turn this one 'const char *' into a 'struct *'.
    New "arguments" can be then added at no cost.
    
    Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
    Reviewed-by: Cedric Bosdonnat <cbosdonnat@suse.com>
    
        
file modified
+57 -49