Fixed 'bug' in log driver that caused kernel messages not to be displayed.
This was caused by a change in the shared driver code. Not log's fault. Renamed #definitions of driver process numbers, e.g., TTY now is TTY_PROC_NR. All known (special) processes now have consistent naming scheme. Kernel tasks don't follow this scheme.
This commit is contained in:
@@ -40,7 +40,8 @@
|
||||
#define SERV_M (~0)
|
||||
#define SYST_M (~0)
|
||||
#define USER_M (s(PM_PROC_NR)|s(FS_PROC_NR)|s(SM_PROC_NR))
|
||||
#define DRIV_M (USER_M | s(SYSTEM)|s(CLOCK)|s(LOG_PROC_NR)|s(TTY))
|
||||
#define DRIV_M (USER_M | \
|
||||
s(SYSTEM)|s(CLOCK)|s(LOG_PROC_NR)|s(TTY_PROC_NR))
|
||||
|
||||
/* Sanity check to make sure the send masks can be set. */
|
||||
extern int dummy[(BITCHUNK_BITS-NR_TASKS > INIT_PROC_NR) ? 1 : -1];
|
||||
|
||||
@@ -196,7 +196,7 @@ int how;
|
||||
*/
|
||||
if (how == RBT_PANIC) {
|
||||
m.m_type = PANIC_DUMPS;
|
||||
if (nb_send(TTY, &m) == OK) /* don't block if TTY isn't ready */
|
||||
if (nb_send(TTY_PROC_NR,&m)==OK) /* don't block if TTY isn't ready */
|
||||
return; /* await sys_abort() from TTY */
|
||||
}
|
||||
|
||||
|
||||
@@ -75,14 +75,14 @@ PUBLIC struct boot_image image[] = {
|
||||
{ PM_PROC_NR, 0, SERV_F, 16, 3, 0, SERV_T, SERV_M, "PM" },
|
||||
{ FS_PROC_NR, 0, SERV_F, 16, 4, 0, SERV_T, SERV_M, "FS" },
|
||||
{ SM_PROC_NR, 0, SERV_F, 16, 3, 0, SERV_T, SYST_M, "SM" },
|
||||
{ TTY, 0, SERV_F, 16, 1, 0, SERV_T, SYST_M, "TTY" },
|
||||
{ MEMORY, 0, SERV_F, 16, 2, 0, SERV_T, DRIV_M, "MEMORY" },
|
||||
{ TTY_PROC_NR, 0, SERV_F, 16, 1, 0, SERV_T, SYST_M, "TTY" },
|
||||
{ MEM_PROC_NR, 0, SERV_F, 16, 2, 0, SERV_T, DRIV_M, "MEMORY" },
|
||||
{ LOG_PROC_NR, 0, SERV_F, 16, 2, 0, SERV_T, SYST_M, "LOG" },
|
||||
#if ENABLE_AT_WINI
|
||||
{ AT_WINI, 0, SERV_F, 16, 2, 0, SERV_T, DRIV_M, "AT_WINI" },
|
||||
{ AT_PROC_NR, 0, SERV_F, 16, 2, 0, SERV_T, DRIV_M, "AT_WINI" },
|
||||
#endif
|
||||
#if ENABLE_BIOS_WINI
|
||||
{ BIOS_WINI, 0, SERV_F, 16, 2, 0, SERV_T, SYST_M, "BIOS" },
|
||||
{ BIOS_PROC_NR, 0, SERV_F, 16, 2, 0, SERV_T, SYST_M, "BIOS" },
|
||||
#endif
|
||||
{ INIT_PROC_NR, 0, USER_F, 8, USER_Q, 0, USER_T, USER_M, "INIT" },
|
||||
};
|
||||
|
||||
@@ -7,18 +7,18 @@
|
||||
*
|
||||
* This file contains the routines that take care of kernel messages, i.e.,
|
||||
* diagnostic output within the kernel. Kernel messages are not directly
|
||||
* displayed on the console, because this must be done by the PRINT driver.
|
||||
* displayed on the console, because this must be done by the output driver.
|
||||
* Instead, the kernel accumulates characters in a buffer and notifies the
|
||||
* output driver when a new message is ready.
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <minix/com.h>
|
||||
#include "kernel.h"
|
||||
#include <stdarg.h>
|
||||
#include <unistd.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#include <minix/com.h>
|
||||
#include "proc.h"
|
||||
|
||||
#define END_OF_KMESS -1
|
||||
@@ -130,7 +130,7 @@ PRIVATE void kputc(c)
|
||||
int c; /* character to append */
|
||||
{
|
||||
/* Accumulate a single character for a kernel message. Send a notification
|
||||
* the to PRINTF_PROC driver if an END_OF_KMESS is encountered.
|
||||
* the to output driver if an END_OF_KMESS is encountered.
|
||||
*/
|
||||
if (c != END_OF_KMESS) {
|
||||
kmess.km_buf[kmess.km_next] = c; /* put normal char in buffer */
|
||||
@@ -138,7 +138,7 @@ int c; /* character to append */
|
||||
kmess.km_size += 1;
|
||||
kmess.km_next = (kmess.km_next + 1) % KMESS_BUF_SIZE;
|
||||
} else {
|
||||
send_sig(PRINTF_PROC, SIGKMESS);
|
||||
send_sig(OUTPUT_PROC_NR, SIGKMESS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user