Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions xo-user.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ static void listen_keyboard_handler(void)
read_attr ^= 1;
write(attr_fd, buf, 6);
if (!read_attr)
printf("Stopping to display the chess board...\n");
printf("\n\nStopping to display the chess board...\n");
break;
case 17: /* Ctrl-Q */
read(attr_fd, buf, 6);
buf[4] = '1';
read_attr = false;
end_attr = true;
write(attr_fd, buf, 6);
printf("Stopping the kernel space tic-tac-toe game...\n");
printf("\n\nStopping the kernel space tic-tac-toe game...\n");
break;
}
}
Expand Down Expand Up @@ -117,6 +117,7 @@ int main(int argc, char *argv[])
FD_CLR(device_fd, &readset);
printf("\033[H\033[J"); /* ASCII escape code to clear the screen */
read(device_fd, display_buf, DRAWBUFFER_SIZE);
display_buf[DRAWBUFFER_SIZE - 1] = '\0';
printf("%s", display_buf);
}
}
Expand Down