subr_prf.c (44731cab3b9966b7ca67f3fe50e7f3c711533730) | subr_prf.c (dbe620d321823d5fdcefd427c5efd8e3f5516db1) |
---|---|
1/*- 2 * Copyright (c) 1986, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 80 unchanged lines hidden (view full) --- 89static char *ksprintn(char *nbuf, u_long num, int base, int *len); 90static char *ksprintqn(char *nbuf, u_quad_t num, int base, int *len); 91static void snprintf_func(int ch, void *arg); 92 93static int consintr = 1; /* Ok to handle console interrupts? */ 94static int msgbufmapped; /* Set when safe to use msgbuf */ 95int msgbuftrigger; 96 | 1/*- 2 * Copyright (c) 1986, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 80 unchanged lines hidden (view full) --- 89static char *ksprintn(char *nbuf, u_long num, int base, int *len); 90static char *ksprintqn(char *nbuf, u_quad_t num, int base, int *len); 91static void snprintf_func(int ch, void *arg); 92 93static int consintr = 1; /* Ok to handle console interrupts? */ 94static int msgbufmapped; /* Set when safe to use msgbuf */ 95int msgbuftrigger; 96 |
97static int log_console_output = 1; 98SYSCTL_INT(_kern, OID_AUTO, log_console_output, CTLFLAG_RW, 99 &log_console_output, 0, ""); 100 |
|
97/* 98 * Warn that a system table is full. 99 */ 100void 101tablefull(const char *tab) 102{ 103 104 log(LOG_ERR, "%s: table is full\n", tab); --- 132 unchanged lines hidden (view full) --- 237log_console(struct uio *uio) 238{ 239 int c, i, error, iovlen, nl; 240 struct uio muio; 241 struct iovec *miov = NULL; 242 char *consbuffer; 243 int pri; 244 | 101/* 102 * Warn that a system table is full. 103 */ 104void 105tablefull(const char *tab) 106{ 107 108 log(LOG_ERR, "%s: table is full\n", tab); --- 132 unchanged lines hidden (view full) --- 241log_console(struct uio *uio) 242{ 243 int c, i, error, iovlen, nl; 244 struct uio muio; 245 struct iovec *miov = NULL; 246 char *consbuffer; 247 int pri; 248 |
249 if (!log_console_output) 250 return; 251 |
|
245 pri = LOG_INFO | LOG_CONSOLE; 246 muio = *uio; 247 iovlen = uio->uio_iovcnt * sizeof (struct iovec); 248 MALLOC(miov, struct iovec *, iovlen, M_TEMP, M_WAITOK); 249 MALLOC(consbuffer, char *, CONSCHUNK, M_TEMP, M_WAITOK); 250 bcopy((caddr_t)muio.uio_iov, (caddr_t)miov, iovlen); 251 muio.uio_iov = miov; 252 uio = &muio; --- 678 unchanged lines hidden --- | 252 pri = LOG_INFO | LOG_CONSOLE; 253 muio = *uio; 254 iovlen = uio->uio_iovcnt * sizeof (struct iovec); 255 MALLOC(miov, struct iovec *, iovlen, M_TEMP, M_WAITOK); 256 MALLOC(consbuffer, char *, CONSCHUNK, M_TEMP, M_WAITOK); 257 bcopy((caddr_t)muio.uio_iov, (caddr_t)miov, iovlen); 258 muio.uio_iov = miov; 259 uio = &muio; --- 678 unchanged lines hidden --- |