spinconsole.c revision 66133
166133Sarchie/* 266133Sarchie * nullconsole.c 366133Sarchie * 466133Sarchie * Copyright (c) 2000 Whistle Communications, Inc. 566133Sarchie * All rights reserved. 666133Sarchie * 766133Sarchie * Subject to the following obligations and disclaimer of warranty, use and 866133Sarchie * redistribution of this software, in source or object code forms, with or 966133Sarchie * without modifications are expressly permitted by Whistle Communications; 1066133Sarchie * provided, however, that: 1166133Sarchie * 1. Any and all reproductions of the source or object code must include the 1266133Sarchie * copyright notice above and the following disclaimer of warranties; and 1366133Sarchie * 2. No rights are granted, in any manner or form, to use Whistle 1466133Sarchie * Communications, Inc. trademarks, including the mark "WHISTLE 1566133Sarchie * COMMUNICATIONS" on advertising, endorsements, or otherwise except as 1666133Sarchie * such appears in the above copyright notice or in the software. 1766133Sarchie * 1866133Sarchie * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND 1966133Sarchie * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO 2066133Sarchie * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, 2166133Sarchie * INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF 2266133Sarchie * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. 2366133Sarchie * WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY 2466133Sarchie * REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS 2566133Sarchie * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE. 2666133Sarchie * IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES 2766133Sarchie * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING 2866133Sarchie * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 2966133Sarchie * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR 3066133Sarchie * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 3166133Sarchie * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 3266133Sarchie * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 3366133Sarchie * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 3466133Sarchie * OF SUCH DAMAGE. 3566133Sarchie * 3666133Sarchie * Author: Doug Ambrisko <ambrisko@whistle.com> 3766133Sarchie * 3866133Sarchie * $FreeBSD: head/sys/boot/i386/libi386/nullconsole.c 66133 2000-09-20 18:13:36Z archie $ 3966133Sarchie */ 4066133Sarchie 4166133Sarchie#include <stand.h> 4266133Sarchie#include <bootstrap.h> 4366133Sarchie 4466133Sarchiestatic void nullc_probe(struct console *cp); 4566133Sarchiestatic int nullc_init(int arg); 4666133Sarchiestatic void nullc_putchar(int c); 4766133Sarchiestatic int nullc_getchar(void); 4866133Sarchiestatic int nullc_ischar(void); 4966133Sarchie 5066133Sarchiestruct console nullconsole = { 5166133Sarchie "nullconsole", 5266133Sarchie "null port", 5366133Sarchie 0, 5466133Sarchie nullc_probe, 5566133Sarchie nullc_init, 5666133Sarchie nullc_putchar, 5766133Sarchie nullc_getchar, 5866133Sarchie nullc_ischar 5966133Sarchie}; 6066133Sarchie 6166133Sarchiestatic void 6266133Sarchienullc_probe(struct console *cp) 6366133Sarchie{ 6466133Sarchie cp->c_flags |= (C_PRESENTIN | C_PRESENTOUT); 6566133Sarchie} 6666133Sarchie 6766133Sarchiestatic int 6866133Sarchienullc_init(int arg) 6966133Sarchie{ 7066133Sarchie return(0); 7166133Sarchie} 7266133Sarchie 7366133Sarchiestatic void 7466133Sarchienullc_putchar(int c) 7566133Sarchie{ 7666133Sarchie} 7766133Sarchie 7866133Sarchiestatic int 7966133Sarchienullc_getchar(void) 8066133Sarchie{ 8166133Sarchie return(-1); 8266133Sarchie} 8366133Sarchie 8466133Sarchiestatic int 8566133Sarchienullc_ischar(void) 8666133Sarchie{ 8766133Sarchie return(0); 8866133Sarchie} 89