2005-07-21 20:29:52 +02:00
|
|
|
/* Includes. */
|
|
|
|
#include "../drivers.h"
|
|
|
|
#include "../libdriver/driver.h"
|
|
|
|
#include <minix/type.h>
|
|
|
|
#include <minix/const.h>
|
|
|
|
#include <minix/com.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <minix/ipc.h>
|
|
|
|
|
|
|
|
/* Constants and types. */
|
|
|
|
|
2005-08-30 18:56:46 +02:00
|
|
|
#define LOG_SIZE (50*1024)
|
2005-07-21 20:29:52 +02:00
|
|
|
#define SUSPENDABLE 1
|
|
|
|
|
|
|
|
struct logdevice {
|
|
|
|
char log_buffer[LOG_SIZE];
|
|
|
|
int log_size, /* no. of bytes in log buffer */
|
|
|
|
log_read, /* read mark */
|
|
|
|
log_write; /* write mark */
|
|
|
|
#if SUSPENDABLE
|
|
|
|
int log_proc_nr,
|
|
|
|
log_source,
|
2005-07-27 15:11:03 +02:00
|
|
|
log_iosize,
|
|
|
|
log_revive_alerted,
|
|
|
|
log_status; /* proc that is blocking on read */
|
2006-06-20 10:55:35 +02:00
|
|
|
vir_bytes log_user_vir_g, log_user_vir_offset;
|
|
|
|
int log_safe;
|
2005-07-21 20:29:52 +02:00
|
|
|
#endif
|
2005-07-27 15:11:03 +02:00
|
|
|
int log_selected, log_select_proc,
|
|
|
|
log_select_alerted, log_select_ready_ops;
|
2005-07-21 20:29:52 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Function prototypes. */
|
|
|
|
_PROTOTYPE( int do_new_kmess, (message *m) );
|
2006-06-20 10:55:35 +02:00
|
|
|
_PROTOTYPE( int do_diagnostics, (message *m, int safe) );
|
2005-07-22 20:24:17 +02:00
|
|
|
_PROTOTYPE( void log_append, (char *buf, int len) );
|
2005-07-21 20:29:52 +02:00
|
|
|
|