]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuDomainCreateDeviceRecursive: pass a structure instead of bare path
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 28 Apr 2017 07:30:23 +0000 (09:30 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 3 May 2017 15:23:03 +0000 (17:23 +0200)
commit26c14be8d64bc9e3c23b95fff65affc2bf7c86bc
tree2fbbb054c6d285e24e098564e00f07e3d5d077c3
parenta7cc039dc796f541793955598377807af48341fb
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>
src/qemu/qemu_domain.c