1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22 /* 23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _SYS_CONSOLE_H 28 #define _SYS_CONSOLE_H 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 /* 35 * Sun private interface for cn driver 36 */ 37 #define _CNIOC (('C'<<24)|('N'<<16)) 38 #define _CNIOC_MASK (~0xffff) 39 #define CONS_GETTERM (_CNIOC | 0) 40 41 #define MAX_TERM_TYPE_LEN 10 42 43 struct cons_getterm { 44 uint_t cn_term_len; 45 char *cn_term_type; 46 }; 47 48 #ifdef _KERNEL 49 50 #include <sys/vnode.h> 51 #include <sys/taskq.h> 52 #include <sys/varargs.h> 53 54 #ifdef _SYSCALL32 55 struct cons_getterm32 { 56 uint32_t cn_term_len; 57 caddr32_t cn_term_type; 58 }; 59 #endif /* _SYSCALL32 */ 60 61 extern void console_get_size(ushort_t *r, ushort_t *c, 62 ushort_t *x, ushort_t *y); 63 /*PRINTFLIKE1*/ 64 extern void console_printf(const char *, ...) __KPRINTFLIKE(1); 65 extern void console_vprintf(const char *, va_list) __KVPRINTFLIKE(1); 66 67 extern void console_puts(const char *, size_t); 68 69 extern void console_gets(char *, size_t); 70 extern int console_getc(void); 71 72 extern int console_enter(int); 73 extern void console_exit(int, int); 74 75 extern vnode_t *console_vnode; 76 extern taskq_t *console_taskq; 77 78 #endif /* _KERNEL */ 79 80 #ifdef __cplusplus 81 } 82 #endif 83 84 #endif /* _SYS_CONSOLE_H */ 85