1 /* $OpenBSD: conf.c,v 1.16 2020/05/26 14:00:42 deraadt Exp $ */ 2 3 /* 4 * Copyright (c) 2006 Michael Shalayeff 5 * All rights reserved. 6 * 7 * Permission to use, copy, modify, and distribute this software for any 8 * purpose with or without fee is hereby granted, provided that the above 9 * copyright notice and this permission notice appear in all copies. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 15 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN 16 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 17 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 #include <sys/param.h> 21 #include <libsa.h> 22 #include <lib/libsa/ufs.h> 23 #ifdef notdef 24 #include <lib/libsa/cd9660.h> 25 #include <lib/libsa/fat.h> 26 #include <lib/libsa/nfs.h> 27 #include <lib/libsa/tftp.h> 28 #include <lib/libsa/netif.h> 29 #endif 30 #include <dev/cons.h> 31 32 const char version[] = "1.09"; 33 int debug = 1; 34 35 struct fs_ops file_system[] = { 36 { ufs_open, ufs_close, ufs_read, ufs_write, ufs_seek, 37 ufs_stat, ufs_readdir, ufs_fchmod }, 38 #ifdef notdef 39 { fat_open, fat_close, fat_read, fat_write, fat_seek, 40 fat_stat, fat_readdir }, 41 { nfs_open, nfs_close, nfs_read, nfs_write, nfs_seek, 42 nfs_stat, nfs_readdir }, 43 { cd9660_open, cd9660_close, cd9660_read, cd9660_write, cd9660_seek, 44 cd9660_stat, cd9660_readdir }, 45 #endif 46 }; 47 int nfsys = nitems(file_system); 48 49 struct devsw devsw[] = { 50 { "dk", blkdevstrategy, blkdevopen, blkdevclose, noioctl }, 51 }; 52 int ndevs = nitems(devsw); 53 54 struct consdev constab[] = { 55 { scif_cnprobe, scif_cninit, scif_cngetc, scif_cnputc }, 56 { NULL } 57 }; 58 struct consdev *cn_tab; 59