提交 50b2a237 编写于 作者: M Michal Privoznik 提交者: Daniel P. Berrange

virfile: Support bind mount only on linux

Other systems (despite having sys/mount.h) do not support bind
mounts.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 ab41ce7f
......@@ -3565,7 +3565,7 @@ int virFileIsSharedFS(const char *path)
}
#if defined(HAVE_SYS_MOUNT_H)
#if defined(__linux__) && defined(HAVE_SYS_MOUNT_H)
int
virFileSetupDev(const char *path,
const char *mount_options)
......@@ -3611,7 +3611,7 @@ virFileBindMountDevice(const char *src,
return 0;
}
#else /* !defined(HAVE_SYS_MOUNT_H) */
#else /* !defined(__linux__) || !defined(HAVE_SYS_MOUNT_H) */
int
virFileSetupDev(const char *path ATTRIBUTE_UNUSED,
......@@ -3631,7 +3631,7 @@ virFileBindMountDevice(const char *src ATTRIBUTE_UNUSED,
_("mount is not supported on this platform."));
return -1;
}
#endif /* !defined(HAVE_SYS_MOUNT_H) */
#endif /* !defined(__linux__) || !defined(HAVE_SYS_MOUNT_H) */
#if defined(HAVE_SYS_ACL_H)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册