mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
qemu_namespace: Move umount() call into #fdef __linux__
In a recent commit I've introduced an umount() call. But the function where the call lives is compiled on all OSes, not just Linux. But umount() is Linux specific. Other OSes have unmount (FreeBSD), or maybe something else. But since namespaces are Linux specific, we can wrap the call in #ifdef __linux__ and not care about other OSes. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
8f95ef95d6
commit
6cd2b4e101
@ -776,10 +776,12 @@ qemuDomainUnshareNamespace(virQEMUDriverConfig *cfg,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__linux__)
|
||||||
if (umount("/dev") < 0) {
|
if (umount("/dev") < 0) {
|
||||||
virReportSystemError(errno, "%s", _("failed to umount devfs on /dev"));
|
virReportSystemError(errno, "%s", _("failed to umount devfs on /dev"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
#endif /* !defined(__linux__) */
|
||||||
|
|
||||||
if (virFileMoveMount(devPath, "/dev") < 0)
|
if (virFileMoveMount(devPath, "/dev") < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
Loading…
Reference in New Issue
Block a user