1*488f0926Schristos /* $NetBSD: conf.c,v 1.6 2012/01/16 18:46:20 christos Exp $ */ 260c3e62aSdsl 360c3e62aSdsl /* 460c3e62aSdsl * Copyright (c) 1997 560c3e62aSdsl * Matthias Drochner. All rights reserved. 660c3e62aSdsl * 760c3e62aSdsl * Redistribution and use in source and binary forms, with or without 860c3e62aSdsl * modification, are permitted provided that the following conditions 960c3e62aSdsl * are met: 1060c3e62aSdsl * 1. Redistributions of source code must retain the above copyright 1160c3e62aSdsl * notice, this list of conditions and the following disclaimer. 1260c3e62aSdsl * 2. Redistributions in binary form must reproduce the above copyright 1360c3e62aSdsl * notice, this list of conditions and the following disclaimer in the 1460c3e62aSdsl * documentation and/or other materials provided with the distribution. 1560c3e62aSdsl * 1660c3e62aSdsl * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1760c3e62aSdsl * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1860c3e62aSdsl * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1960c3e62aSdsl * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2060c3e62aSdsl * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2160c3e62aSdsl * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2260c3e62aSdsl * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2360c3e62aSdsl * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2460c3e62aSdsl * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2560c3e62aSdsl * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2660c3e62aSdsl */ 2760c3e62aSdsl 2860c3e62aSdsl 2960c3e62aSdsl #include <sys/cdefs.h> 3060c3e62aSdsl 3160c3e62aSdsl #include <sys/types.h> 3260c3e62aSdsl 3360c3e62aSdsl #include <lib/libsa/stand.h> 3460c3e62aSdsl #include <lib/libsa/ufs.h> 3560c3e62aSdsl #include <lib/libsa/lfs.h> 36052ab035Stsutsui #ifdef SUPPORT_EXT2FS 37052ab035Stsutsui #include <lib/libsa/ext2fs.h> 38052ab035Stsutsui #endif 39*488f0926Schristos #ifdef SUPPORT_MINIXFS3 40*488f0926Schristos #include <lib/libsa/minixfs3.h> 41*488f0926Schristos #endif 4260c3e62aSdsl #ifdef SUPPORT_USTARFS 4360c3e62aSdsl #include <lib/libsa/ustarfs.h> 4460c3e62aSdsl #endif 4560c3e62aSdsl #ifdef SUPPORT_DOSFS 4660c3e62aSdsl #include <lib/libsa/dosfs.h> 4760c3e62aSdsl #endif 48c53f251eSjunyoung #ifdef SUPPORT_CD9660 49c53f251eSjunyoung #include <lib/libsa/cd9660.h> 50c53f251eSjunyoung #endif 5160c3e62aSdsl 5260c3e62aSdsl #include <biosdisk.h> 5360c3e62aSdsl 5460c3e62aSdsl struct devsw devsw[] = { 55c53f251eSjunyoung {"disk", biosdisk_strategy, biosdisk_open, biosdisk_close, 56c53f251eSjunyoung biosdisk_ioctl}, 5760c3e62aSdsl }; 5860c3e62aSdsl int ndevs = sizeof(devsw) / sizeof(struct devsw); 5960c3e62aSdsl 6060c3e62aSdsl struct fs_ops file_system[] = { 61c53f251eSjunyoung #ifdef SUPPORT_CD9660 62c53f251eSjunyoung FS_OPS(cd9660), 63c53f251eSjunyoung #endif 6460c3e62aSdsl #ifdef SUPPORT_USTARFS 6560c3e62aSdsl FS_OPS(ustarfs), 6660c3e62aSdsl #endif 6760c3e62aSdsl FS_OPS(ffsv1), FS_OPS(ffsv2), 6860c3e62aSdsl FS_OPS(lfsv1), FS_OPS(lfsv2), 69052ab035Stsutsui #ifdef SUPPORT_EXT2FS 70052ab035Stsutsui FS_OPS(ext2fs), 71052ab035Stsutsui #endif 72*488f0926Schristos #ifdef SUPPORT_MINIXFS3 73*488f0926Schristos FS_OPS(minixfs3), 74*488f0926Schristos #endif 7560c3e62aSdsl #ifdef SUPPORT_DOSFS 7660c3e62aSdsl FS_OPS(dosfs), 7760c3e62aSdsl #endif 7860c3e62aSdsl }; 7960c3e62aSdsl int nfsys = sizeof(file_system) / sizeof(struct fs_ops); 80