feat: kprintf now goes into dedicated pseudo-dev rather than flooding the framebuffer
[lunaix-os.git] / lunaix-os / arch / i386 / mm / pfault.c
index b028d844d9d64b4ee72a3b2d8faa111ec981e7e5..2533d0bac8dc1829f6361ae7caa5428e9bd1e495 100644 (file)
@@ -1,4 +1,3 @@
-#include <lunaix/common.h>
 #include <lunaix/mm/mm.h>
 #include <lunaix/mm/pmm.h>
 #include <lunaix/mm/region.h>
@@ -68,7 +67,7 @@ intr_routine_page_fault(const isr_param* param)
     if (PG_IS_PRESENT(*pte)) {
         if (((errcode ^ mapping.flags) & PG_ALLOW_USER)) {
             // invalid access
-            kprintf(KDEBUG "invalid user access. (%p->%p, attr:0x%x)\n",
+            kprintf(KDEBUG "invalid user access. (%p->%p, attr:0x%x)",
                     mapping.va,
                     mapping.pa,
                     mapping.flags);
@@ -134,7 +133,7 @@ intr_routine_page_fault(const isr_param* param)
         }
 
         if (errno < 0) {
-            kprintf(KERROR "fail to populate page (%d)\n", errno);
+            kprintf(KERROR "fail to populate page (%d)", errno);
             goto segv_term;
         }
 
@@ -149,10 +148,10 @@ intr_routine_page_fault(const isr_param* param)
         ;
 
 oom:
-    kprintf(KERROR "out of memory\n");
+    kprintf(KERROR "out of memory");
 
 segv_term:
-    kprintf(KERROR "(pid: %d) Segmentation fault on %p (%p:%p,e=0x%x)\n",
+    kprintf(KERROR "(pid: %d) Segmentation fault on %p (%p:%p,e=0x%x)",
             __current->pid,
             ptr,
             param->execp->cs,