conf.c revision 1.6
1/* $OpenBSD: conf.c,v 1.6 1999/01/25 21:53:31 mickey Exp $ */ 2 3/* 4 * Copyright (c) 1998 Michael Shalayeff 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 2. Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 14 * documentation and/or other materials provided with the distribution. 15 * 3. All advertising materials mentioning features or use of this software 16 * must display the following acknowledgement: 17 * This product includes software developed by Michael Shalayeff. 18 * 4. The name of the author may not be used to endorse or promote products 19 * derived from this software without specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 */ 32 33#include <sys/types.h> 34#include <libsa.h> 35#include <machine/lifvar.h> 36#include <lib/libsa/ufs.h> 37#include <lib/libsa/cd9660.h> 38#include <lib/libsa/exec.h> 39#include <dev/cons.h> 40 41const char version[] = "0.04"; 42int debug = 1; 43 44const struct x_sw execsw[] = { 45 { "elf", elf_probe, elf_load, elf_ldsym }, 46/* { "som", som_probe, som_load, som_ldsym }, */ 47 { "" , NULL, NULL }, 48}; 49 50struct fs_ops file_system[] = { 51 { lif_open, lif_close, lif_read, lif_write, lif_seek, 52 lif_stat, lif_readdir }, 53 { ufs_open, ufs_close, ufs_read, ufs_write, ufs_seek, 54 ufs_stat, ufs_readdir }, 55 { cd9660_open, cd9660_close, cd9660_read, cd9660_write, cd9660_seek, 56 cd9660_stat, cd9660_readdir }, 57}; 58int nfsys = NENTS(file_system); 59 60struct devsw devsw[] = { 61 { "ct", iodcstrategy, ctopen, ctclose, noioctl }, 62 { "sd", iodcstrategy, dkopen, dkclose, noioctl }, 63 { "lf", iodcstrategy, lfopen, lfclose, noioctl } 64}; 65int ndevs = NENTS(devsw); 66 67struct consdev constab[] = { 68 { ite_probe, ite_init, ite_getc, ite_putc }, 69 { NULL } 70}; 71struct consdev *cn_tab; 72 73