From: John Hodge Date: Tue, 22 Sep 2009 03:52:30 +0000 (+0800) Subject: Wrapping fix in vterm, increased verbosity of MM_Allocate X-Git-Tag: rel0.06~541 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=a04d40c6d54762969e12b3e1a3e159b912124525;p=tpg%2Facess2.git Wrapping fix in vterm, increased verbosity of MM_Allocate --- diff --git a/Kernel/arch/x86/mm_virt.c b/Kernel/arch/x86/mm_virt.c index b03d8473..cdd071c0 100644 --- a/Kernel/arch/x86/mm_virt.c +++ b/Kernel/arch/x86/mm_virt.c @@ -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; } diff --git a/Kernel/drv/vterm.c b/Kernel/drv/vterm.c index 8aa7321b..d8c3039a 100644 --- a/Kernel/drv/vterm.c +++ b/Kernel/drv/vterm.c @@ -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;