#include "zbud.h"
#include "ramster.h"
#ifdef CONFIG_RAMSTER
-static int ramster_enabled;
+static bool ramster_enabled __read_mostly;
#else
-#define ramster_enabled 0
+#define ramster_enabled false
#endif
#ifndef __PG_WAS_ACTIVE
/* enable (or fix code) when Seth's patches are accepted upstream */
#define zcache_writeback_enabled 0
-static int zcache_enabled __read_mostly;
-static int disable_cleancache __read_mostly;
-static int disable_frontswap __read_mostly;
-static int disable_frontswap_ignore_nonactive __read_mostly;
-static int disable_cleancache_ignore_nonactive __read_mostly;
+static bool zcache_enabled __read_mostly;
+static bool disable_cleancache __read_mostly;
+static bool disable_frontswap __read_mostly;
+static bool disable_frontswap_ignore_nonactive __read_mostly;
+static bool disable_cleancache_ignore_nonactive __read_mostly;
static char *namestr __read_mostly = "zcache";
#define ZCACHE_GFP_MASK \
static int __init enable_zcache(char *s)
{
- zcache_enabled = 1;
+ zcache_enabled = true;
return 1;
}
__setup("zcache", enable_zcache);
static int __init enable_ramster(char *s)
{
- zcache_enabled = 1;
+ zcache_enabled = true;
#ifdef CONFIG_RAMSTER
- ramster_enabled = 1;
+ ramster_enabled = true;
#endif
return 1;
}
static int __init no_cleancache(char *s)
{
- disable_cleancache = 1;
+ disable_cleancache = true;
return 1;
}
static int __init no_frontswap(char *s)
{
- disable_frontswap = 1;
+ disable_frontswap = true;
return 1;
}
static int __init no_frontswap_ignore_nonactive(char *s)
{
- disable_frontswap_ignore_nonactive = 1;
+ disable_frontswap_ignore_nonactive = true;
return 1;
}
static int __init no_cleancache_ignore_nonactive(char *s)
{
- disable_cleancache_ignore_nonactive = 1;
+ disable_cleancache_ignore_nonactive = true;
return 1;
}
static int __init enable_zcache_compressor(char *s)
{
strncpy(zcache_comp_name, s, ZCACHE_COMP_NAME_SZ);
- zcache_enabled = 1;
+ zcache_enabled = true;
return 1;
}
__setup("zcache=", enable_zcache_compressor);