mcexec: check kernel version <= 3.10 for RHEL mcoverlayfs

This commit is contained in:
Balazs Gerofi
2017-10-31 13:39:31 +09:00
parent 0ecf31d896
commit 85d36f1469

View File

@@ -148,17 +148,25 @@ char **__glob_argv = 0;
#ifdef ENABLE_MCOVERLAYFS
#undef ENABLE_MCOVERLAYFS
#ifndef RHEL_RELEASE_CODE
// RedHat?
#ifdef RHEL_RELEASE_CODE
#if LINUX_VERSION_CODE <= KERNEL_VERSION(3,10,0)
#define ENABLE_MCOVERLAYFS 1
#else
#error "ERROR: your Linux kernel version on RHEL is not supported"
#endif // LINUX_VERSION_CODE <= KERNEL_VERSION(3,10,0)
// Other distro?
#else
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0) && LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
#define ENABLE_MCOVERLAYFS 1
#endif // LINUX_VERSION_CODE == 4.0
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0) && LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
#define ENABLE_MCOVERLAYFS 1
#endif // LINUX_VERSION_CODE == 4.6
#else
#if RHEL_RELEASE_CODE <= RHEL_RELEASE_VERSION(7,3)
#define ENABLE_MCOVERLAYFS 1
#endif // RHEL_RELEASE_CODE <= 7.3
#endif // RHEL_RELEASE_CODE
#endif // ENABLE_MCOVERLAYFS