1*9a2413ffSkiyohara /* $NetBSD: conf.c,v 1.9 2010/10/14 06:58:22 kiyohara Exp $ */ 2b1bde3fcSsakamoto 3b1bde3fcSsakamoto /* 4b1bde3fcSsakamoto * Copyright (c) 1982, 1986, 1990, 1993 5b1bde3fcSsakamoto * The Regents of the University of California. All rights reserved. 6b1bde3fcSsakamoto * 7b1bde3fcSsakamoto * Redistribution and use in source and binary forms, with or without 8b1bde3fcSsakamoto * modification, are permitted provided that the following conditions 9b1bde3fcSsakamoto * are met: 10b1bde3fcSsakamoto * 1. Redistributions of source code must retain the above copyright 11b1bde3fcSsakamoto * notice, this list of conditions and the following disclaimer. 12b1bde3fcSsakamoto * 2. Redistributions in binary form must reproduce the above copyright 13b1bde3fcSsakamoto * notice, this list of conditions and the following disclaimer in the 14b1bde3fcSsakamoto * documentation and/or other materials provided with the distribution. 15aad01611Sagc * 3. Neither the name of the University nor the names of its contributors 16b1bde3fcSsakamoto * may be used to endorse or promote products derived from this software 17b1bde3fcSsakamoto * without specific prior written permission. 18b1bde3fcSsakamoto * 19b1bde3fcSsakamoto * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20b1bde3fcSsakamoto * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21b1bde3fcSsakamoto * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22b1bde3fcSsakamoto * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23b1bde3fcSsakamoto * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24b1bde3fcSsakamoto * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25b1bde3fcSsakamoto * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26b1bde3fcSsakamoto * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27b1bde3fcSsakamoto * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28b1bde3fcSsakamoto * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29b1bde3fcSsakamoto * SUCH DAMAGE. 30b1bde3fcSsakamoto * 31b1bde3fcSsakamoto * @(#)conf.c 8.1 (Berkeley) 6/10/93 32b1bde3fcSsakamoto */ 33b1bde3fcSsakamoto 34b1bde3fcSsakamoto #include <sys/param.h> 35e63501d2Sjunyoung #include <lib/libsa/stand.h> 36b1bde3fcSsakamoto 379fe16975Skiyohara extern int fdstrategy(void *, int, daddr_t, size_t, void *, size_t *); 389fe16975Skiyohara extern int fdopen(struct open_file *, ...); 399fe16975Skiyohara extern int fdclose(struct open_file *); 40b1bde3fcSsakamoto 419fe16975Skiyohara extern int instrategy(void *, int, daddr_t, size_t, void *, size_t *); 429fe16975Skiyohara extern int inopen(struct open_file *, ...); 439fe16975Skiyohara extern int inclose(struct open_file *); 44b1bde3fcSsakamoto 45*9a2413ffSkiyohara extern int sdstrategy(void *, int, daddr_t, size_t, void *, size_t *); 46*9a2413ffSkiyohara extern int sdopen(struct open_file *, ...); 47*9a2413ffSkiyohara extern int sdclose(struct open_file *); 48*9a2413ffSkiyohara 4901f89bfdSkiyohara extern int wdstrategy(void *, int, daddr_t, size_t, void *, size_t *); 5001f89bfdSkiyohara extern int wdopen(struct open_file *, ...); 5101f89bfdSkiyohara extern int wdclose(struct open_file *); 5201f89bfdSkiyohara 53b1bde3fcSsakamoto struct devsw devsw[] = { 54b1bde3fcSsakamoto { "fd", fdstrategy, fdopen, fdclose, noioctl }, 55*9a2413ffSkiyohara { "sd", sdstrategy, sdopen, sdclose, noioctl }, 5601f89bfdSkiyohara { "wd", wdstrategy, wdopen, wdclose, noioctl }, 579fe16975Skiyohara 589fe16975Skiyohara { NULL, NULL, NULL, NULL, NULL }, 59b1bde3fcSsakamoto }; 609fe16975Skiyohara struct devsw pseudo_devsw = { "in", instrategy, inopen, inclose, noioctl }; 61b1bde3fcSsakamoto 62f174987aSjunyoung int ndevs = sizeof(devsw) / sizeof(devsw[0]); 63