10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 51253Slq150181 * Common Development and Distribution License (the "License"). 61253Slq150181 * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 211253Slq150181 220Sstevel@tonic-gate /* 23*7688SAaron.Zang@Sun.COM * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 240Sstevel@tonic-gate * Use is subject to license terms. 250Sstevel@tonic-gate */ 260Sstevel@tonic-gate 270Sstevel@tonic-gate #ifndef _SYS_CONSOLE_H 280Sstevel@tonic-gate #define _SYS_CONSOLE_H 290Sstevel@tonic-gate 300Sstevel@tonic-gate #ifdef __cplusplus 310Sstevel@tonic-gate extern "C" { 320Sstevel@tonic-gate #endif 330Sstevel@tonic-gate 341253Slq150181 /* 351253Slq150181 * Sun private interface for cn driver 361253Slq150181 */ 371253Slq150181 #define _CNIOC (('C'<<24)|('N'<<16)) 381253Slq150181 #define _CNIOC_MASK (~0xffff) 391253Slq150181 #define CONS_GETTERM (_CNIOC | 0) 401253Slq150181 411253Slq150181 #define MAX_TERM_TYPE_LEN 10 421253Slq150181 431253Slq150181 struct cons_getterm { 441253Slq150181 uint_t cn_term_len; 451253Slq150181 char *cn_term_type; 461253Slq150181 }; 471253Slq150181 480Sstevel@tonic-gate #ifdef _KERNEL 490Sstevel@tonic-gate 500Sstevel@tonic-gate #include <sys/vnode.h> 510Sstevel@tonic-gate #include <sys/taskq.h> 520Sstevel@tonic-gate #include <sys/varargs.h> 530Sstevel@tonic-gate 541253Slq150181 #ifdef _SYSCALL32 551253Slq150181 struct cons_getterm32 { 561253Slq150181 uint32_t cn_term_len; 571253Slq150181 caddr32_t cn_term_type; 581253Slq150181 }; 591253Slq150181 #endif /* _SYSCALL32 */ 601253Slq150181 610Sstevel@tonic-gate extern void console_get_size(ushort_t *r, ushort_t *c, 620Sstevel@tonic-gate ushort_t *x, ushort_t *y); 630Sstevel@tonic-gate /*PRINTFLIKE1*/ 640Sstevel@tonic-gate extern void console_printf(const char *, ...) __KPRINTFLIKE(1); 650Sstevel@tonic-gate extern void console_vprintf(const char *, va_list) __KVPRINTFLIKE(1); 660Sstevel@tonic-gate 670Sstevel@tonic-gate extern void console_puts(const char *, size_t); 680Sstevel@tonic-gate 690Sstevel@tonic-gate extern void console_gets(char *, size_t); 700Sstevel@tonic-gate extern int console_getc(void); 710Sstevel@tonic-gate 720Sstevel@tonic-gate extern int console_enter(int); 730Sstevel@tonic-gate extern void console_exit(int, int); 740Sstevel@tonic-gate 750Sstevel@tonic-gate extern vnode_t *console_vnode; 760Sstevel@tonic-gate extern taskq_t *console_taskq; 770Sstevel@tonic-gate 780Sstevel@tonic-gate #endif /* _KERNEL */ 790Sstevel@tonic-gate 800Sstevel@tonic-gate #ifdef __cplusplus 810Sstevel@tonic-gate } 820Sstevel@tonic-gate #endif 830Sstevel@tonic-gate 840Sstevel@tonic-gate #endif /* _SYS_CONSOLE_H */ 85