1*3c550524Sjoerg /* $NetBSD: common.h,v 1.3 2011/01/22 19:19:22 joerg Exp $ */ 2c188bc0cScgd 3c188bc0cScgd /* 4c188bc0cScgd * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. 5c188bc0cScgd * 6c188bc0cScgd * Redistribution and use in source and binary forms, with or without 7c188bc0cScgd * modification, are permitted provided that the following conditions 8c188bc0cScgd * are met: 9c188bc0cScgd * 1. Redistributions of source code must retain the above copyright 10c188bc0cScgd * notice, this list of conditions and the following disclaimer. 11c188bc0cScgd * 2. Redistributions in binary form must reproduce the above copyright 12c188bc0cScgd * notice, this list of conditions and the following disclaimer in the 13c188bc0cScgd * documentation and/or other materials provided with the distribution. 14c188bc0cScgd * 3. All advertising materials mentioning features or use of this software 15c188bc0cScgd * must display the following acknowledgement: 16c188bc0cScgd * This product includes software developed by Christopher G. Demetriou 17c188bc0cScgd * for the NetBSD Project. 18c188bc0cScgd * 4. The name of the author may not be used to endorse or promote products 19c188bc0cScgd * derived from this software without specific prior written permission 20c188bc0cScgd * 21c188bc0cScgd * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22c188bc0cScgd * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23c188bc0cScgd * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24c188bc0cScgd * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25c188bc0cScgd * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26c188bc0cScgd * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27c188bc0cScgd * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28c188bc0cScgd * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29c188bc0cScgd * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30c188bc0cScgd * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31c188bc0cScgd */ 32c188bc0cScgd 3302cdf4d2Sdsl void halt(void); 3402cdf4d2Sdsl void putstr(const char *); 35c188bc0cScgd void init_console(void); 36c188bc0cScgd void putchar(int); 37c188bc0cScgd int getchar(void); 38c188bc0cScgd 39c188bc0cScgd 40c188bc0cScgd /* 41c188bc0cScgd * vers.c (generated by newvers.sh) 42c188bc0cScgd */ 43c188bc0cScgd extern const char bootprog_rev[]; 44c188bc0cScgd 45c188bc0cScgd /* 46c188bc0cScgd * booted_dev.c 47c188bc0cScgd */ 48c188bc0cScgd 49c188bc0cScgd #define BOOTED_DEV_MAXNAMELEN 64 50c188bc0cScgd 51c188bc0cScgd #if defined(PRIMARY_BOOTBLOCK) || defined(UNIFIED_BOOTBLOCK) 52c188bc0cScgd int booted_dev_open(void); 53c188bc0cScgd #endif 54c188bc0cScgd void booted_dev_close(void); 55c188bc0cScgd #if defined(SECONDARY_BOOTBLOCK) 56c188bc0cScgd #define booted_dev_setfd(fd) ((void)(booted_dev_fd = fd)) 57c188bc0cScgd #endif 58c188bc0cScgd 59c188bc0cScgd extern int booted_dev_fd; 60c188bc0cScgd #if defined(PRIMARY_BOOTBLOCK) || defined(UNIFIED_BOOTBLOCK) 61c188bc0cScgd extern char booted_dev_name[BOOTED_DEV_MAXNAMELEN]; 62c188bc0cScgd #endif 63c188bc0cScgd 64c188bc0cScgd 65c188bc0cScgd /* 66c188bc0cScgd * putstr.c 67c188bc0cScgd */ 68c188bc0cScgd 69c188bc0cScgd void putstr(const char *s); 70