1*f14fb602SLionel Sambuc /* $NetBSD: conf.c,v 1.6 2012/01/16 18:46:20 christos Exp $ */ 258a2b000SEvgeniy Ivanov 358a2b000SEvgeniy Ivanov /* 458a2b000SEvgeniy Ivanov * Copyright (c) 1997 558a2b000SEvgeniy Ivanov * Matthias Drochner. All rights reserved. 658a2b000SEvgeniy Ivanov * 758a2b000SEvgeniy Ivanov * Redistribution and use in source and binary forms, with or without 858a2b000SEvgeniy Ivanov * modification, are permitted provided that the following conditions 958a2b000SEvgeniy Ivanov * are met: 1058a2b000SEvgeniy Ivanov * 1. Redistributions of source code must retain the above copyright 1158a2b000SEvgeniy Ivanov * notice, this list of conditions and the following disclaimer. 1258a2b000SEvgeniy Ivanov * 2. Redistributions in binary form must reproduce the above copyright 1358a2b000SEvgeniy Ivanov * notice, this list of conditions and the following disclaimer in the 1458a2b000SEvgeniy Ivanov * documentation and/or other materials provided with the distribution. 1558a2b000SEvgeniy Ivanov * 1658a2b000SEvgeniy Ivanov * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 1758a2b000SEvgeniy Ivanov * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 1858a2b000SEvgeniy Ivanov * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1958a2b000SEvgeniy Ivanov * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 2058a2b000SEvgeniy Ivanov * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 2158a2b000SEvgeniy Ivanov * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2258a2b000SEvgeniy Ivanov * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2358a2b000SEvgeniy Ivanov * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2458a2b000SEvgeniy Ivanov * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 2558a2b000SEvgeniy Ivanov * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2658a2b000SEvgeniy Ivanov */ 2758a2b000SEvgeniy Ivanov 2858a2b000SEvgeniy Ivanov 2958a2b000SEvgeniy Ivanov #include <sys/cdefs.h> 3058a2b000SEvgeniy Ivanov 3158a2b000SEvgeniy Ivanov #include <sys/types.h> 3258a2b000SEvgeniy Ivanov 3358a2b000SEvgeniy Ivanov #include <lib/libsa/stand.h> 3458a2b000SEvgeniy Ivanov #include <lib/libsa/ufs.h> 3558a2b000SEvgeniy Ivanov #include <lib/libsa/lfs.h> 3658a2b000SEvgeniy Ivanov #ifdef SUPPORT_EXT2FS 3758a2b000SEvgeniy Ivanov #include <lib/libsa/ext2fs.h> 3858a2b000SEvgeniy Ivanov #endif 3958a2b000SEvgeniy Ivanov #ifdef SUPPORT_MINIXFS3 4058a2b000SEvgeniy Ivanov #include <lib/libsa/minixfs3.h> 4158a2b000SEvgeniy Ivanov #endif 4258a2b000SEvgeniy Ivanov #ifdef SUPPORT_USTARFS 4358a2b000SEvgeniy Ivanov #include <lib/libsa/ustarfs.h> 4458a2b000SEvgeniy Ivanov #endif 4558a2b000SEvgeniy Ivanov #ifdef SUPPORT_DOSFS 4658a2b000SEvgeniy Ivanov #include <lib/libsa/dosfs.h> 4758a2b000SEvgeniy Ivanov #endif 4858a2b000SEvgeniy Ivanov #ifdef SUPPORT_CD9660 4958a2b000SEvgeniy Ivanov #include <lib/libsa/cd9660.h> 5058a2b000SEvgeniy Ivanov #endif 5158a2b000SEvgeniy Ivanov 5258a2b000SEvgeniy Ivanov #include <biosdisk.h> 5358a2b000SEvgeniy Ivanov 5458a2b000SEvgeniy Ivanov struct devsw devsw[] = { 5558a2b000SEvgeniy Ivanov {"disk", biosdisk_strategy, biosdisk_open, biosdisk_close, 5658a2b000SEvgeniy Ivanov biosdisk_ioctl}, 5758a2b000SEvgeniy Ivanov }; 5858a2b000SEvgeniy Ivanov int ndevs = sizeof(devsw) / sizeof(struct devsw); 5958a2b000SEvgeniy Ivanov 6058a2b000SEvgeniy Ivanov struct fs_ops file_system[] = { 6158a2b000SEvgeniy Ivanov #ifdef SUPPORT_CD9660 6258a2b000SEvgeniy Ivanov FS_OPS(cd9660), 6358a2b000SEvgeniy Ivanov #endif 6458a2b000SEvgeniy Ivanov #ifdef SUPPORT_USTARFS 6558a2b000SEvgeniy Ivanov FS_OPS(ustarfs), 6658a2b000SEvgeniy Ivanov #endif 6758a2b000SEvgeniy Ivanov FS_OPS(ffsv1), FS_OPS(ffsv2), 6858a2b000SEvgeniy Ivanov FS_OPS(lfsv1), FS_OPS(lfsv2), 6958a2b000SEvgeniy Ivanov #ifdef SUPPORT_EXT2FS 7058a2b000SEvgeniy Ivanov FS_OPS(ext2fs), 7158a2b000SEvgeniy Ivanov #endif 7258a2b000SEvgeniy Ivanov #ifdef SUPPORT_MINIXFS3 7358a2b000SEvgeniy Ivanov FS_OPS(minixfs3), 7458a2b000SEvgeniy Ivanov #endif 7558a2b000SEvgeniy Ivanov #ifdef SUPPORT_DOSFS 7658a2b000SEvgeniy Ivanov FS_OPS(dosfs), 7758a2b000SEvgeniy Ivanov #endif 7858a2b000SEvgeniy Ivanov }; 7958a2b000SEvgeniy Ivanov int nfsys = sizeof(file_system) / sizeof(struct fs_ops); 80