#include <Input/Keyboard/include/keyboard.h>
#include "keymap_int.h"
#include "layout_kbdus.h"
+#include <hal_proc.h>
#define USE_KERNEL_MAGIC 1
// === PROTOTYPES ===
int Keyboard_Install(char **Arguments);
-void Keyboard_Cleanup(void);
+ int Keyboard_Cleanup(void);
// - Internal
tKeymap *Keyboard_LoadMap(const char *Name);
void Keyboard_FreeMap(tKeymap *Keymap);
-// - User side
+// - "User" side (Actually VT)
int Keyboard_IOCtl(tVFS_Node *Node, int ID, void *Data);
// - Device Side
tKeyboard *Keyboard_CreateInstance(int MaxSym, const char *Name);
/**
* \brief Pre-unload cleanup function
*/
-void Keyboard_Cleanup(void)
+int Keyboard_Cleanup(void)
{
// TODO: Do I need this?
+ return 0;
}
// --- Map Management ---
Uint32 flag;
Uint8 layer;
+ if( !Source ) {
+ Log_Error("Keyboard", "Passed NULL handle");
+ return ;
+ }
+ if( !Source->Node ) {
+ Log_Error("Keyboard", "Passed handle with NULL node");
+ return ;
+ }
+
bPressed = !(HIDKeySym & (1 << 31));
HIDKeySym &= 0x7FFFFFFF;
case 'p': Threads_Dump(); return;
// Heap Statistics
case 'h': Heap_Stats(); return;
+ // PMem Statistics
+ case 'm': MM_DumpStatistics(); return;
// Dump Structure
case 's': return;
}