Added demand paging support
[akaros.git] / kern / arch / i686 / env.c
index 864b2da..4a858a2 100644 (file)
@@ -112,7 +112,7 @@ int env_user_mem_walk(env_t* e, void* start, size_t len,
                                      PTX(end) : NPTENTRIES );
                int ret;
                for (pteno = pteno_start; pteno < pteno_end; pteno++) {
-                       if (pt[pteno] & PTE_P)
+                       if (!PAGE_UNMAPPED(pt[pteno]))
                                if((ret = callback(e, &pt[pteno], PGADDR(pdeno, pteno, 0), arg)))
                                        return ret;
                }