• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 #ifndef __SWAP_ON_OFF_H_
3 #define __SWAP_ON_OFF_H_
4 
5 /*
6  * Read swapon(2) / swapoff(2) for a full history lesson behind the value of
7  * MAX_SWAPFILES.
8  */
9 #include <linux/version.h>
10 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18)
11 #define MAX_SWAPFILES 30
12 #elif LINUX_VERSION_CODE > KERNEL_VERSION(2, 4, 10)
13 #define MAX_SWAPFILES 32
14 #else
15 #define MAX_SWAPFILES 8
16 #endif
17 
18 #endif
19