Home | History | Annotate | Line # | Download | only in boot
      1 /*	$NetBSD: conf.c,v 1.19 2025/07/14 12:39:34 hans Exp $ */
      2 /*
      3  * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
      4  * All rights reserved.
      5  *
      6  * Redistribution and use in source and binary forms, with or without
      7  * modification, are permitted provided that the following conditions
      8  * are met:
      9  * 1. Redistributions of source code must retain the above copyright
     10  *    notice, this list of conditions and the following disclaimer.
     11  * 2. Redistributions in binary form must reproduce the above copyright
     12  *    notice, this list of conditions and the following disclaimer in the
     13  *    documentation and/or other materials provided with the distribution.
     14  *
     15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     17  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     18  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     19  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     20  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     21  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     22  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     24  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     25  */
     26 
     27  /* All bugs are subject to removal without further notice */
     28 
     29 #include <sys/param.h>
     30 
     31 #include <netinet/in.h>
     32 
     33 #include "../../include/rpb.h"
     34 
     35 #include <lib/libkern/libkern.h>
     36 
     37 #include <lib/libsa/stand.h>
     38 #include <lib/libsa/ufs.h>
     39 #include <lib/libsa/nfs.h>
     40 #include <lib/libsa/cd9660.h>
     41 #include <lib/libsa/ustarfs.h>
     42 
     43 #include "vaxstand.h"
     44 
     45 static int nostrategy(void *, int, daddr_t, size_t, void *, size_t *);
     46 
     47 struct	devsw devsw[]={
     48 	SADEV("hp",hpstrategy, hpopen, nullsys, noioctl),
     49 	SADEV("qe",nostrategy, qeopen, qeclose, noioctl), /* DEQNA */
     50 	SADEV("ctu",ctustrategy, ctuopen, nullsys, noioctl),
     51 	SADEV("ra",rastrategy, raopen, raclose, noioctl),
     52 	SADEV("mt",rastrategy, raopen, nullsys, noioctl),
     53         SADEV("rom",romstrategy, romopen, nullsys, noioctl),
     54         SADEV("rd",mfmstrategy, mfmopen, nullsys, noioctl),
     55         SADEV("sd",romstrategy, romopen, nullsys, noioctl),
     56         SADEV("sd",romstrategy, romopen, nullsys, noioctl),
     57 	SADEV("st",nullsys, nullsys, nullsys, noioctl),
     58 	SADEV("le",nostrategy, leopen, leclose, noioctl), /* LANCE */
     59         SADEV("ze",nostrategy, zeopen, zeclose, noioctl), /* SGEC */
     60 	SADEV("rl",romstrategy, romopen, nullsys, noioctl),
     61 	SADEV("de",nostrategy, deopen, declose, noioctl), /* DEUNA */
     62 	SADEV("ni",nostrategy, niopen, nullsys, noioctl), /* DEBNA */
     63 };
     64 
     65 int	cnvtab[] = {
     66 	BDEV_HP,
     67 	BDEV_QE,
     68 	BDEV_CNSL,
     69 	BDEV_UDA,
     70 	BDEV_TK,
     71 	-1,
     72 	BDEV_RD,
     73 	BDEV_SD,
     74 	BDEV_SDN,
     75 	BDEV_ST,
     76 	BDEV_LE,
     77 	BDEV_ZE,
     78 	BDEV_RL,
     79 	BDEV_DE,
     80 	BDEV_NI,
     81 };
     82 
     83 int     ndevs = (sizeof(devsw)/sizeof(devsw[0]));
     84 
     85 struct fs_ops file_system[] = {
     86 	FS_OPS(ffsv1),
     87 	FS_OPS(ffsv2),
     88 	FS_OPS(nfs),
     89 	FS_OPS(cd9660),
     90 	FS_OPS(ustarfs),
     91 };
     92 
     93 int nfsys = __arraycount(file_system);
     94 
     95 int
     96 nostrategy(void *f, int func, daddr_t dblk,
     97     size_t size, void *buf, size_t *rsize)
     98 {
     99 	*rsize = size;
    100 	memset(buf, 0, size);
    101 	return 0;
    102 }
    103