summaryrefslogtreecommitdiff
path: root/minix/drivers/system/log/log.h
blob: a4170aaba57e38ff32865a122a1cf17d47ce1bf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* Includes. */
#include <minix/drivers.h>
#include <minix/chardriver.h>
#include <minix/type.h>
#include <minix/const.h>
#include <minix/com.h>
#include <sys/types.h>
#include <minix/ipc.h>

/* Constants and types. */

#define LOG_SIZE	(50*1024) 

struct logdevice {
	char log_buffer[LOG_SIZE];
	int	log_size,	/* no. of bytes in log buffer */
		log_read,	/* read mark */
		log_write;	/* write mark */
	endpoint_t log_source;
	cdev_id_t log_id;
	int log_iosize,
		log_status;
	cp_grant_id_t log_grant;
	int	log_selected, log_select_proc;
};

/* Function prototypes. */
void do_new_kmess(void);
void log_append(char *buf, int len);