1 /* Includes. */ 2 #include <minix/drivers.h> 3 #include <minix/chardriver.h> 4 #include <minix/type.h> 5 #include <minix/const.h> 6 #include <minix/com.h> 7 #include <sys/types.h> 8 #include <minix/ipc.h> 9 10 /* Constants and types. */ 11 12 #define LOG_SIZE (50*1024) 13 14 struct logdevice { 15 char log_buffer[LOG_SIZE]; 16 int log_size, /* no. of bytes in log buffer */ 17 log_read, /* read mark */ 18 log_write; /* write mark */ 19 endpoint_t log_source; 20 cdev_id_t log_id; 21 int log_iosize, 22 log_status; 23 cp_grant_id_t log_grant; 24 int log_selected, log_select_proc; 25 }; 26 27 /* Function prototypes. */ 28 void do_new_kmess(void); 29 void log_append(char *buf, int len); 30 31