#include <fs_devfs.h>
#include <modules.h>
#include <tpl_drv_video.h>
+#include <tpl_drv_keyboard.h>
// === CONSTANTS ===
#define NUM_VTS 4
{
giVT_InputDevHandle = VFS_Open(gsVT_InputDevice, VFS_OPENFLAG_READ);
LOG("giVT_InputDevHandle = %x\n", giVT_InputDevHandle);
+ if(giVT_InputDevHandle == -1) return ;
+ VFS_IOCtl(giVT_InputDevHandle, KB_IOCTL_SETCALLBACK, VT_KBCallBack);
}
/**
extern Uint64 VFS_ReadAt(int FD, Uint64 Offset, Uint64 Length, void *Buffer);
extern Uint64 VFS_WriteAt(int FD, Uint64 Offset, Uint64 Length, void *Buffer);
+extern int VFS_IOCtl(int FD, int ID, void *Buffer);
+
extern void VFS_GetMemPath(void *Base, Uint Length, char *Dest);
extern char *VFS_GetTruePath(char *Path);
h->Position = Distance;
return 0;
}
+
+/**
+ * \fn int VFS_IOCtl(int FD, int ID, void *Buffer)
+ */
+int VFS_IOCtl(int FD, int ID, void *Buffer)
+{
+ tVFS_Handle *h;
+
+ h = VFS_GetHandle(FD);
+ if(!h) return -1;
+
+ if(!h->Node->IOCtl) return -1;
+ return h->Node->IOCtl(h->Node, ID, Buffer);
+}