/proc/mounts is now used in addition to /proc/meminfo for detecting huge page
sizes.  Override the contents of that file as well.

Signed-off-by: Adam Litke <[EMAIL PROTECTED]>
---

 tests/meminfo_nohuge.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tests/meminfo_nohuge.c b/tests/meminfo_nohuge.c
index 026ccd1..7cbc624 100644
--- a/tests/meminfo_nohuge.c
+++ b/tests/meminfo_nohuge.c
@@ -45,6 +45,13 @@ int open(const char *path, int flags, ...)
                return fileno(f);
        }
 
+       if (strcmp(path, "/proc/mounts") == 0) {
+               FILE *f;
+
+               f = popen("/bin/grep -vi hugetlbfs /proc/mounts", "r");
+               return fileno(f);
+       }
+
        old_open = dlsym(RTLD_NEXT, "open");
        if (flags & O_CREAT) {
                va_list ap;


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to