]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuDomainAttachDeviceMknodRecursive: Isolate bind mounted devices condition
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 21 Jul 2020 07:44:36 +0000 (09:44 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 3 Aug 2020 17:40:35 +0000 (19:40 +0200)
commitbf9aeab4f0c274e56bc7bc25ff0c27186c6befda
tree2afa9c34127257349f864044088718e2848b05ee
parent08277c2bc661ab1c50a595b37b098ca354d53d91
qemuDomainAttachDeviceMknodRecursive: Isolate bind mounted devices condition

When attaching a device into a domain, the corresponding /dev
node might need to be created in the domain's namespace. For some
types of files we call mknod(), for symlinks we call symlink(),
but for others - which exist in the host namespace - we need to
so called 'bind mount' them (which is a way of passing a
file/directory between mount namespaces). There is this condition
in qemuDomainAttachDeviceMknodRecursive() which decides whether a
bind mount will be used, move it into a separate function so that
it can be reused later.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_namespace.c