17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5fea9cb91Slq * Common Development and Distribution License (the "License"). 6fea9cb91Slq * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 21fea9cb91Slq 227c478bd9Sstevel@tonic-gate /* 23aecfc01dSrui zang - Sun Microsystems - Beijing China * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate * Use is subject to license terms. 257c478bd9Sstevel@tonic-gate */ 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate #ifndef _SYS_CONSOLE_H 287c478bd9Sstevel@tonic-gate #define _SYS_CONSOLE_H 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate #ifdef __cplusplus 317c478bd9Sstevel@tonic-gate extern "C" { 327c478bd9Sstevel@tonic-gate #endif 337c478bd9Sstevel@tonic-gate 34fea9cb91Slq /* 35fea9cb91Slq * Sun private interface for cn driver 36fea9cb91Slq */ 37fea9cb91Slq #define _CNIOC (('C'<<24)|('N'<<16)) 38fea9cb91Slq #define _CNIOC_MASK (~0xffff) 39fea9cb91Slq #define CONS_GETTERM (_CNIOC | 0) 40*c542a624SJoshua M. Clulow #define CONS_GETDEV (_CNIOC | 1) 41fea9cb91Slq 42fea9cb91Slq #define MAX_TERM_TYPE_LEN 10 43fea9cb91Slq 44fea9cb91Slq struct cons_getterm { 45fea9cb91Slq uint_t cn_term_len; 46fea9cb91Slq char *cn_term_type; 47fea9cb91Slq }; 48fea9cb91Slq 49*c542a624SJoshua M. Clulow struct cons_getdev { 50*c542a624SJoshua M. Clulow dev_t cnd_rconsdev; 51*c542a624SJoshua M. Clulow }; 52*c542a624SJoshua M. Clulow 537c478bd9Sstevel@tonic-gate #ifdef _KERNEL 547c478bd9Sstevel@tonic-gate 557c478bd9Sstevel@tonic-gate #include <sys/vnode.h> 567c478bd9Sstevel@tonic-gate #include <sys/taskq.h> 577c478bd9Sstevel@tonic-gate #include <sys/varargs.h> 587c478bd9Sstevel@tonic-gate 59fea9cb91Slq #ifdef _SYSCALL32 60fea9cb91Slq struct cons_getterm32 { 61fea9cb91Slq uint32_t cn_term_len; 62fea9cb91Slq caddr32_t cn_term_type; 63fea9cb91Slq }; 64*c542a624SJoshua M. Clulow 65*c542a624SJoshua M. Clulow struct cons_getdev32 { 66*c542a624SJoshua M. Clulow dev32_t cnd_rconsdev; 67*c542a624SJoshua M. Clulow }; 68fea9cb91Slq #endif /* _SYSCALL32 */ 69fea9cb91Slq 707c478bd9Sstevel@tonic-gate extern void console_get_size(ushort_t *r, ushort_t *c, 717c478bd9Sstevel@tonic-gate ushort_t *x, ushort_t *y); 727c478bd9Sstevel@tonic-gate /*PRINTFLIKE1*/ 737c478bd9Sstevel@tonic-gate extern void console_printf(const char *, ...) __KPRINTFLIKE(1); 747c478bd9Sstevel@tonic-gate extern void console_vprintf(const char *, va_list) __KVPRINTFLIKE(1); 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gate extern void console_puts(const char *, size_t); 777c478bd9Sstevel@tonic-gate 787c478bd9Sstevel@tonic-gate extern void console_gets(char *, size_t); 797c478bd9Sstevel@tonic-gate extern int console_getc(void); 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate extern int console_enter(int); 827c478bd9Sstevel@tonic-gate extern void console_exit(int, int); 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gate extern vnode_t *console_vnode; 857c478bd9Sstevel@tonic-gate extern taskq_t *console_taskq; 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate #endif /* _KERNEL */ 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gate #ifdef __cplusplus 907c478bd9Sstevel@tonic-gate } 917c478bd9Sstevel@tonic-gate #endif 927c478bd9Sstevel@tonic-gate 937c478bd9Sstevel@tonic-gate #endif /* _SYS_CONSOLE_H */ 94