Signed-off-by: Eric B Munson <[EMAIL PROTECTED]>
---
Changes from V1: Rebase to libhuge 2.1

 debug.c     |   16 ----------------
 hugeutils.c |   14 ++++++++++++++
 2 files changed, 14 insertions(+), 16 deletions(-)

diff --git a/debug.c b/debug.c
index 7082aeb..a9254d6 100644
--- a/debug.c
+++ b/debug.c
@@ -36,25 +36,9 @@ static int initialized;
 
 static void __hugetlbfs_init_debug(void)
 {
-       char *env;
-
        if (initialized)
                return;
 
-       env = getenv("HUGETLB_VERBOSE");
-       if (env)
-               __hugetlbfs_verbose = atoi(env);
-
-       env = getenv("HUGETLB_DEBUG");
-       if (env) {
-               __hugetlbfs_debug = 1;
-               __hugetlbfs_verbose = VERBOSE_DEBUG;
-       }
-
-       env = getenv("HUGETLB_NO_PREFAULT");
-       if (env)
-               __hugetlbfs_prefault = 0;
-
        gethostname(__hugetlbfs_hostname, sizeof(__hugetlbfs_hostname)-1);
 
        initialized = 1;
diff --git a/hugeutils.c b/hugeutils.c
index b83de12..ead9f4e 100644
--- a/hugeutils.c
+++ b/hugeutils.c
@@ -235,7 +235,21 @@ int file_write_ulong(char *file, unsigned long val)
  */
 void hugetlbfs_setup_env()
 {
+       char *env;
+
+       env = getenv("HUGETLB_VERBOSE");
+       if (env)
+               __hugetlbfs_verbose = atoi(env);
+
+       env = getenv("HUGETLB_DEBUG");
+       if (env) {
+               __hugetlbfs_debug = 1;
+               __hugetlbfs_verbose = VERBOSE_DEBUG;
+       }
 
+       env = getenv("HUGETLB_NO_PREFAULT");
+       if (env)
+               __hugetlbfs_prefault = 0;
 }
 
 /*
-- 
1.6.0.3


------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to