1/*- 2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> 3 * All rights reserved. 4 * 5 * Copyright (c) 2008-2009 Ed Schouten <ed@FreeBSD.org> 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/dev/syscons/scterm-teken.c 189617 2009-03-10 11:28:54Z ed $"); |
32 33#include "opt_syscons.h" 34 35#include <sys/param.h> 36#include <sys/systm.h> 37#include <sys/kernel.h> 38#include <sys/module.h> 39#include <sys/consio.h> --- 108 unchanged lines hidden (view full) --- 148 reserved_teken_stat.ts_busy = 0; 149 } 150 --sc_term_scteken.te_refcount; 151 152 return (0); 153} 154 155static void |
156scteken_puts(scr_stat *scp, u_char *buf, int len, int kernel) |
157{ 158 teken_stat *ts = scp->ts; |
159 teken_attr_t backup, kattr; |
160 161 scp->sc->write_in_progress++; |
162 if (kernel) { 163 /* Use special colors for kernel messages. */ 164 backup = *teken_get_curattr(&ts->ts_teken); 165 scteken_revattr(SC_KERNEL_CONS_ATTR, &kattr); 166 teken_set_curattr(&ts->ts_teken, &kattr); 167 teken_input(&ts->ts_teken, buf, len); 168 teken_set_curattr(&ts->ts_teken, &backup); 169 } else { 170 /* Print user messages with regular colors. */ 171 teken_input(&ts->ts_teken, buf, len); 172 } |
173 scp->sc->write_in_progress--; 174} 175 176static int 177scteken_ioctl(scr_stat *scp, struct tty *tp, u_long cmd, caddr_t data, 178 struct thread *td) 179{ 180 teken_stat *ts = scp->ts; --- 340 unchanged lines hidden --- |