*** empty log message ***
This commit is contained in:
parent
98124a8082
commit
e156a1c5ed
@ -25,7 +25,6 @@ message *m; /* notification message */
|
||||
struct kmessages kmess; /* entire kmess structure */
|
||||
char print_buf[KMESS_BUF_SIZE]; /* copy new message here */
|
||||
static int prev_next = 0;
|
||||
int size, next;
|
||||
int bytes;
|
||||
int i, r;
|
||||
|
||||
|
@ -33,7 +33,6 @@ FORWARD _PROTOTYPE( int log_select, (struct driver *dp, message *m_ptr) );
|
||||
FORWARD _PROTOTYPE( void log_signal, (struct driver *dp, message *m_ptr) );
|
||||
FORWARD _PROTOTYPE( int log_other, (struct driver *dp, message *m_ptr) );
|
||||
FORWARD _PROTOTYPE( void log_geometry, (struct partition *entry) );
|
||||
FORWARD _PROTOTYPE( void log_reply, (int code, int replyee, int proc, int status) );
|
||||
FORWARD _PROTOTYPE( int subread, (struct logdevice *log, int count, int proc_nr, vir_bytes user_vir) );
|
||||
|
||||
/* Entry points to this driver. */
|
||||
@ -59,7 +58,7 @@ extern int device_caller;
|
||||
/*===========================================================================*
|
||||
* main *
|
||||
*===========================================================================*/
|
||||
PUBLIC void main(void)
|
||||
PUBLIC int main(void)
|
||||
{
|
||||
int i;
|
||||
for(i = 0; i < NR_DEVS; i++) {
|
||||
@ -72,8 +71,9 @@ PUBLIC void main(void)
|
||||
logdevices[i].log_select_ready_ops = 0;
|
||||
logdevices[i].log_proc_nr = 0;
|
||||
logdevices[i].log_revive_alerted = 0;
|
||||
}
|
||||
driver_task(&log_dtab);
|
||||
}
|
||||
driver_task(&log_dtab);
|
||||
return(OK);
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
@ -221,7 +221,7 @@ unsigned nr_req; /* length of request vector */
|
||||
vir_bytes user_vir;
|
||||
struct device *dv;
|
||||
unsigned long dv_size;
|
||||
int s, accumulated_read = 0;
|
||||
int accumulated_read = 0;
|
||||
struct logdevice *log;
|
||||
|
||||
if(log_device < 0 || log_device >= NR_DEVS)
|
||||
@ -233,7 +233,6 @@ unsigned nr_req; /* length of request vector */
|
||||
log = &logdevices[log_device];
|
||||
|
||||
while (nr_req > 0) {
|
||||
char *buf;
|
||||
/* How much to transfer and where to / from. */
|
||||
count = iov->iov_size;
|
||||
user_vir = iov->iov_addr;
|
||||
@ -289,23 +288,6 @@ unsigned nr_req; /* length of request vector */
|
||||
return(OK);
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
* log_reply *
|
||||
*===========================================================================*/
|
||||
PRIVATE void log_reply(code, replyee, process, status)
|
||||
int code; /* TASK_REPLY or REVIVE */
|
||||
int replyee; /* destination for message (normally FS) */
|
||||
int process; /* which user requested the printing */
|
||||
int status; /* number of chars printed or error code */
|
||||
{
|
||||
message mess;
|
||||
|
||||
mess.m_type = code;
|
||||
mess.REP_STATUS = status;
|
||||
mess.REP_PROC_NR = process;
|
||||
send(replyee, &mess);
|
||||
}
|
||||
|
||||
/*============================================================================*
|
||||
* log_do_open *
|
||||
*============================================================================*/
|
||||
@ -351,7 +333,7 @@ message *m_ptr;
|
||||
*============================================================================*/
|
||||
PRIVATE void do_status(message *m_ptr)
|
||||
{
|
||||
int d, nr = 0;
|
||||
int d;
|
||||
message m;
|
||||
|
||||
/* Caller has requested pending status information, which currently
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
PRIVATE struct device m_geom[NR_DEVS]; /* base and size of each device */
|
||||
PRIVATE int m_device; /* current device */
|
||||
PRIVATE struct randomness krandom; /* randomness from the kernel */
|
||||
|
||||
extern int errno; /* error number for PM calls */
|
||||
|
||||
@ -59,10 +58,11 @@ PRIVATE char random_buf[RANDOM_BUF_SIZE];
|
||||
/*===========================================================================*
|
||||
* main *
|
||||
*===========================================================================*/
|
||||
PUBLIC void main(void)
|
||||
PUBLIC int main(void)
|
||||
{
|
||||
r_init(); /* initialize the memory driver */
|
||||
driver_task(&r_dtab); /* start driver's main loop */
|
||||
return(OK);
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
@ -100,13 +100,10 @@ iovec_t *iov; /* pointer to read or write request vector */
|
||||
unsigned nr_req; /* length of request vector */
|
||||
{
|
||||
/* Read or write one the driver's minor devices. */
|
||||
phys_bytes mem_phys, user_phys;
|
||||
int seg;
|
||||
unsigned count, left, chunk;
|
||||
vir_bytes user_vir;
|
||||
struct device *dv;
|
||||
unsigned long dv_size;
|
||||
int s;
|
||||
|
||||
/* Get minor device number and check for /dev/null. */
|
||||
dv = &m_geom[m_device];
|
||||
@ -175,8 +172,6 @@ message *m_ptr;
|
||||
PRIVATE void r_init()
|
||||
{
|
||||
/* Initialize this task. All minor devices are initialized one by one. */
|
||||
int i, s;
|
||||
|
||||
random_init();
|
||||
r_random(NULL, NULL); /* also set periodic timer */
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user