A Total Overhaul on the Lunaix's Virtual Memory Model (#26)
[lunaix-os.git] / lunaix-os / hal / char / devzero.c
index 9c0b6c75518dd24dccc4043fd8fb35263f635786..9013a471f09c22234ff6984e105e700980f04eb1 100644 (file)
@@ -1,13 +1,13 @@
 #include <lunaix/device.h>
-#include <lunaix/mm/page.h>
+#include <lunaix/mm/pagetable.h>
 
 #include <klibc/string.h>
 
 static int
 __zero_rd_pg(struct device* dev, void* buf, size_t offset)
 {
-    memset(&((u8_t*)buf)[offset], 0, PG_SIZE);
-    return PG_SIZE;
+    memset(&((u8_t*)buf)[offset], 0, PAGE_SIZE);
+    return PAGE_SIZE;
 }
 
 static int
@@ -24,7 +24,7 @@ pdev_zerodev_init(struct device_def* def)
     devzero->ops.read_page = __zero_rd_pg;
     devzero->ops.read = __zero_rd;
 
-    device_register(devzero, &def->class, "zero");
+    register_device(devzero, &def->class, "zero");
 
     return 0;
 }