aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric B Munson <emunson@mgebm.net>2010-11-30 11:21:09 -0700
committerEric B Munson <emunson@mgebm.net>2010-11-30 11:21:09 -0700
commitee093392b99a62f8b243390d4d131c1b55b884c0 (patch)
treefca0b7b7221c4fe4211cfd27005d195955407585
parent19672f42352aea7119f6976523faa136ef6aad4d (diff)
downloadlibhugetlbfs-ee093392b99a62f8b243390d4d131c1b55b884c0.tar.gz
Move global boolean values to use bool type
This patch moves the global boolean values __hugetlbfs_debug and __hugetlbfs_prefault to the bool type. Signed-off-by: Eric B Munson <emunson@mgebm.net>
-rw-r--r--debug.c4
-rw-r--r--hugeutils.c6
-rw-r--r--libhugetlbfs_internal.h4
3 files changed, 7 insertions, 7 deletions
diff --git a/debug.c b/debug.c
index a9254d6..6bc7b76 100644
--- a/debug.c
+++ b/debug.c
@@ -28,8 +28,8 @@
#include "libhugetlbfs_internal.h"
int __hugetlbfs_verbose = VERBOSITY_DEFAULT;
-int __hugetlbfs_debug = 0;
-int __hugetlbfs_prefault = 1;
+bool __hugetlbfs_debug = false;
+bool __hugetlbfs_prefault = true;
char __hugetlbfs_hostname[64];
static int initialized;
diff --git a/hugeutils.c b/hugeutils.c
index 29e5fcc..26a0471 100644
--- a/hugeutils.c
+++ b/hugeutils.c
@@ -249,13 +249,13 @@ void hugetlbfs_setup_env()
env = getenv("HUGETLB_DEBUG");
if (env) {
- __hugetlbfs_debug = 1;
+ __hugetlbfs_debug = true;
__hugetlbfs_verbose = VERBOSE_DEBUG;
}
env = getenv("HUGETLB_NO_PREFAULT");
if (env)
- __hugetlbfs_prefault = 0;
+ __hugetlbfs_prefault = false;
__hugetlb_opts.share_path = getenv("HUGETLB_SHARE_PATH");
__hugetlb_opts.elfmap = getenv("HUGETLB_ELFMAP");
@@ -336,7 +336,7 @@ void hugetlbfs_check_priv_resv()
if (hugetlbfs_test_feature(HUGETLB_FEATURE_PRIVATE_RESV) > 0) {
INFO("Kernel has MAP_PRIVATE reservations. Disabling "
"heap prefaulting.\n");
- __hugetlbfs_prefault = 0;
+ __hugetlbfs_prefault = false;
}
}
diff --git a/libhugetlbfs_internal.h b/libhugetlbfs_internal.h
index 1bd2821..068bbff 100644
--- a/libhugetlbfs_internal.h
+++ b/libhugetlbfs_internal.h
@@ -86,9 +86,9 @@ struct libhugeopts_t {
#define __hugetlbfs_verbose __lh___hugetlbfs_verbose
extern int __hugetlbfs_verbose;
#define __hugetlbfs_debug __lh___hugetlbfs_debug
-extern int __hugetlbfs_debug;
+extern bool __hugetlbfs_debug;
#define __hugetlbfs_prefault __lh___hugetlbfs_prefault
-extern int __hugetlbfs_prefault;
+extern bool __hugetlbfs_prefault;
#define hugetlbfs_setup_env __lh_hugetlbfs_setup_env
extern void hugetlbfs_setup_env();
#define hugetlbfs_setup_elflink __lh_hugetlbfs_setup_elflink