Wrapping fix in vterm, increased verbosity of MM_Allocate
authorJohn Hodge <[email protected]>
Tue, 22 Sep 2009 03:52:30 +0000 (11:52 +0800)
committerJohn Hodge <[email protected]>
Tue, 22 Sep 2009 03:52:30 +0000 (11:52 +0800)
Kernel/arch/x86/mm_virt.c
Kernel/drv/vterm.c

index b03d847..cdd071c 100644 (file)
@@ -212,7 +212,7 @@ tPAddr MM_Allocate(Uint VAddr)
        }
        // Check if the page is already allocated
        else if( gaPageTable[ VAddr >> 12 ] != 0 ) {
-               Warning("MM_Allocate - Allocating to used address");
+               Warning("MM_Allocate - Allocating to used address (%p)", VAddr);
                return gaPageTable[ VAddr >> 12 ] & ~0xFFF;
        }
        
index 8aa7321..d8c3039 100644 (file)
@@ -247,6 +247,7 @@ Uint64 VT_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer)
                                LOG("WriteUTF8(%p, 0x%x)", Buffer+pos, term->InputBuffer[term->InputRead]);
                                pos += WriteUTF8(Buffer+pos, term->InputBuffer[term->InputRead]);
                                term->InputRead ++;
+                               term->InputRead %= MAX_INPUT_CHARS;
                        }
                }
                break;
@@ -260,6 +261,7 @@ Uint64 VT_Read(tVFS_Node *Node, Uint64 Offset, Uint64 Length, void *Buffer)
                                ((Uint32*)Buffer)[pos] = term->InputBuffer[term->InputRead];
                                pos ++;
                                term->InputRead ++;
+                               term->InputRead %= MAX_INPUT_CHARS;
                        }
                }
                break;

UCC git Repository :: git.ucc.asn.au