I'm trying to change the keyboard driver in minix, my idea is store in a file all the characters that the used introduced in the keyboard.I declare a global FILE * fp and insert this piece of code in /usr/src/drivers/tty/keyboard.c
while (icount > 0) {
scode = *itail++; /* take one key scan code */
if (itail == ibuf + KB_IN_BYTES) itail = ibuf;
icount--;
/* Function keys are being used for debug dumps. */
if (func_key(scode)) continue;
/* Perform make/break processing. */
ch = make_break(scode);
if (ch <= 0xFF) {
/* A normal character. */
fp = fopen("log.txt","a+");
fprint(fp,"%c",ch);
fclose(fp);
buf[0] = ch;
(void) in_process(tp, buf, 1);
} else ...
then I run "make" in the directory and reboot but this does not work. I mean, the file is not created. Any idea?