head 1.10; access; symbols ktrace-lwp:1.10.0.24 ktrace-lwp-base:1.10 nathanw_sa_before_merge:1.10 gmcgarry_ctxsw:1.10.0.22 gmcgarry_ctxsw_base:1.10 gmcgarry_ucred:1.10.0.20 gmcgarry_ucred_base:1.10 nathanw_sa_base:1.10 gehenna-devsw:1.10.0.18 gehenna-devsw-base:1.10 eeh-devprop:1.10.0.16 eeh-devprop-base:1.10 newlock:1.10.0.14 newlock-base:1.10 ifpoll:1.10.0.12 ifpoll-base:1.10 thorpej-mips-cache:1.10.0.10 thorpej-mips-cache-base:1.10 thorpej-devvp:1.10.0.8 thorpej-devvp-base:1.10 kqueue:1.10.0.6 kqueue-base:1.10 thorpej_scsipi_beforemerge:1.10 thorpej_scsipi_nbase:1.10 chs-ubc2-newbase:1.10 fvdl-softdep-base:1.10 thorpej_scsipi:1.10.0.4 thorpej_scsipi_base:1.10 thorpej-signal:1.10.0.2 thorpej-signal-base:1.10 marc-pcmcia-base:1.10 netbsd-1-2-PATCH001:1.9 thorpej-setroot:1.9.0.4 netbsd-1-2-RELEASE:1.9 netbsd-1-2-BETA:1.9 netbsd-1-2:1.9.0.6 netbsd-1-2-base:1.9 date-03-may-96:1.1.1.1 netbsd:1.1.1 netbsd-1-1-PATCH001:1.9 netbsd-1-1-RELEASE:1.9 netbsd-1-1:1.9.0.2 netbsd-1-1-base:1.9 netbsd-1-0-PATCH06:1.8 netbsd-1-0-PATCH05:1.8 netbsd-1-0-PATCH04:1.8 netbsd-1-0-PATCH03:1.8 netbsd-1-0-PATCH02:1.8 netbsd-1-0-PATCH1:1.8 netbsd-1-0-PATCH0:1.8 netbsd-1-0-RELEASE:1.8 netbsd-1-0:1.8.0.2 netbsd-1-0-base:1.8 magnum-base:1.1 magnum:1.1.0.4 netbsd-0-9-patch-001:1.1 netbsd-0-9-RELEASE:1.1 netbsd-0-9-BETA:1.1 netbsd-0-9-ALPHA2:1.1 netbsd-0-9-ALPHA:1.1 netbsd-0-9:1.1.0.2 netbsd-0-9-base:1.1; locks; strict; comment @ * @; 1.10 date 97.01.31.19.11.31; author thorpej; state dead; branches; next 1.9; 1.9 date 95.04.30.07.03.13; author cgd; state Exp; branches; next 1.8; 1.8 date 94.06.29.06.42.44; author cgd; state Exp; branches; next 1.7; 1.7 date 94.04.29.15.54.10; author glass; state Exp; branches; next 1.6; 1.6 date 94.04.18.06.18.24; author glass; state Exp; branches; next 1.5; 1.5 date 94.03.01.08.00.02; author glass; state Exp; branches; next 1.4; 1.4 date 94.01.18.01.35.15; author brezak; state Exp; branches; next 1.3; 1.3 date 93.12.18.00.46.03; author mycroft; state Exp; branches; next 1.2; 1.2 date 93.10.14.03.05.02; author glass; state Exp; branches; next 1.1; 1.1 date 93.07.07.12.06.40; author cgd; state Exp; branches 1.1.4.1; next ; 1.1.4.1 date 93.11.14.22.22.32; author mycroft; state Exp; branches; next ; desc @@ 1.10 log @This file is now obsolete. @ text @/* $NetBSD: swapnfs.c,v 1.9 1995/04/30 07:03:13 cgd Exp $ */ /* * Copyright (c) 1991 The Regents of the University of California. * All rights reserved. * * This code is derived from software contributed to Berkeley by * Rick Macklem at The University of Guelph. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @@(#)nfsswapvmunix.c 7.1 (Berkeley) 3/4/91 */ /* * NFS parameters are now filled in nfs_mountroot() by * nfs_boot(). */ #include #include #include #include #include dev_t rootdev = NODEV; dev_t argdev = NODEV; dev_t dumpdev = NODEV; struct swdevt swdevt[] = { { NODEV, 0, 0 }, { NODEV, 0, 0 } }; extern int nfs_mountroot(); int (*mountroot)() = nfs_mountroot; @ 1.9 log @kill unnecessary blank line at end of file @ text @d1 1 a1 1 /* $NetBSD: swapnfs.c,v 1.8 1994/06/29 06:42:44 cgd Exp $ */ @ 1.8 log @New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' @ text @d1 1 a1 1 /* $NetBSD$ */ a63 1 @ 1.7 log @i really wish i knew what was wrong @ text @d1 2 d38 1 a38 2 * from: @@(#)nfsswapvmunix.c 7.1 (Berkeley) 3/4/91 * $Id: swapnfs.c,v 1.6 1994/04/18 06:18:24 glass Exp $ @ 1.6 log @revised nfs diskless support. uses bootp+rpc to gather parameters @ text @d37 1 a37 1 * $Id: swapnfs.c,v 1.5 1994/03/01 08:00:02 glass Exp $ d58 1 a58 1 { 0, 0, 0 } @ 1.5 log @remove some warnings @ text @d37 1 a37 1 * $Id: swapnfs.c,v 1.4 1994/01/18 01:35:15 brezak Exp $ d41 2 a42 3 * Sample NFS swapvmunix configuration file. * This should be filled in by the bootstrap program. * See /sys/nfs/nfsdiskless.h for details of the fields. a51 3 #include #include d58 1 a58 1 { 0, 0, 0 } a61 40 /* We start with transfer sizes of 4K during boot */ /* as the WD8003 has problems to support 8K of back to back packets */ struct nfs_diskless nfs_diskless = { { 0 }, /* myif */ { 0 }, /* mygateway */ { /* swap_args */ 0, /* addr */ 0, /* sotype */ 0, /* proto */ 0, /* fh */ NFSMNT_WSIZE|NFSMNT_RSIZE, /* flags */ 4096, /* wsize */ 4096, /* rsize */ 0, /* timeo */ 0, /* retrans */ 0 /* hostname */ }, { 0 }, /* swap_fh */ { 0 }, /* swap_saddr */ { 0 }, /* swap_hostnam */ { /* root_args */ 0, /* addr */ 0, /* sotype */ 0, /* proto */ 0, /* fh */ NFSMNT_WSIZE|NFSMNT_RSIZE, /* flags */ 4096, /* wsize */ 4096, /* rsize */ 0, /* timeo */ 0, /* retrans */ 0 /* hostname */ }, { 0 }, /* root_fh */ { 0 }, /* root_saddr */ { 0 } /* root_hostnam */ }; #ifndef NFSDISKLESS_HARDWIRE d63 1 a63 62 #else int nfs_hack_mountroot(); int (*mountroot)() = nfs_hack_mountroot; #define NFS_SOCKET 2049 /* this is an egregious hack necessitated by many unfortunate circumstances*/ int nfs_hack_mountroot() { struct ifaliasreq diskless_if = { "le0", /* temporarily */ NFSDISKLESS_IF_ADDR, NFSDISKLESS_IF_BADDR, NFSDISKLESS_IF_MASK }; #ifdef NFSDISKLESS_GATEWAY struct sockaddr diskless_gateway = NFSDISKLESS_GATEWAY; #endif u_char diskless_swap_fh[NFS_FHSIZE] = NFSDISKLESS_SWAP_FH; struct sockaddr diskless_swap_saddr = NFSDISKLESS_SWAP_SADDR; u_char diskless_root_fh[NFS_FHSIZE] = NFSDISKLESS_ROOT_FH; struct sockaddr diskless_root_saddr = NFSDISKLESS_ROOT_SADDR; char *diskless_swap_hostnam = "solipsist"; char *diskless_root_hostnam = "solipsist"; nfs_diskless.swap_saddr.sa_data[0] = nfs_diskless.root_saddr.sa_data[0] = NFS_SOCKET >> 8; nfs_diskless.swap_saddr.sa_data[1] = nfs_diskless.root_saddr.sa_data[1] = NFS_SOCKET & 0x00FF; bcopy(&diskless_if, &nfs_diskless.myif, sizeof(diskless_if)); #ifdef NFSDISKLESS_GATEWAY bcopy(&diskless_gateway, &nfs_diskless.mygateway, sizeof(diskless_gateway)); #endif bcopy(&diskless_swap_saddr, &nfs_diskless.swap_saddr, sizeof(diskless_swap_saddr)); bcopy(&diskless_root_saddr, &nfs_diskless.root_saddr, sizeof(diskless_root_saddr)); bcopy(diskless_root_fh, nfs_diskless.root_fh, NFS_FHSIZE); bcopy(diskless_swap_fh, nfs_diskless.swap_fh, NFS_FHSIZE); strcpy(nfs_diskless.swap_hostnam, diskless_swap_hostnam); strcpy(nfs_diskless.root_hostnam, diskless_root_hostnam); nfs_diskless.swap_args.addr = &nfs_diskless.swap_saddr; nfs_diskless.swap_args.fh = (nfsv2fh_t *) nfs_diskless.swap_fh; nfs_diskless.swap_args.sotype = SOCK_DGRAM; nfs_diskless.swap_args.timeo = 10; nfs_diskless.swap_args.retrans = 100; nfs_diskless.swap_args.hostname = nfs_diskless.swap_hostnam; nfs_diskless.root_args.addr = &nfs_diskless.root_saddr; nfs_diskless.root_args.fh = (nfsv2fh_t *) nfs_diskless.root_fh; nfs_diskless.root_args.sotype = SOCK_DGRAM; nfs_diskless.root_args.timeo = 10; nfs_diskless.root_args.retrans = 100; nfs_diskless.root_args.hostname = nfs_diskless.root_hostnam; return nfs_mountroot(); } #endif @ 1.4 log @Include nfs_hack_mountroot() in NFSDISKLESS_HARDWIRE @ text @d37 1 a37 1 * $Id: swapnfs.c,v 1.3 1993/12/18 00:46:03 mycroft Exp $ d153 1 a153 1 nfs_diskless.swap_args.fh = nfs_diskless.swap_fh; d159 1 a159 1 nfs_diskless.root_args.fh = nfs_diskless.root_fh; @ 1.3 log @Canonicalize all #includes. @ text @d37 1 a37 1 * $Id: swapnfs.c,v 1.2 1993/10/14 03:05:02 glass Exp $ a112 2 #endif d167 2 @ 1.2 log @this is the disgusting temporary hack to assist people booting over nfs via hacked structures until netboot works. the word "abortion" comes to mind. @ text @d37 1 a37 1 * $Id: swapnfs.c,v 1.1 1993/07/07 12:06:40 cgd Exp $ d46 9 a54 7 #include "../sys/param.h" #include "../sys/conf.h" #include "../sys/socket.h" #include "../sys/mount.h" #include "../net/if.h" #include "../nfs/nfsv2.h" #include "../nfs/nfsdiskless.h" @ 1.1 log @changes from ws to support diskless booting... these are "OK" on inspection and after testing... (actually, currently, none of the changed code is even used...) @ text @d37 1 a37 1 * $Id$ a63 1 int (*mountroot)() = nfs_mountroot; d101 66 @ 1.1.4.1 log @Canonicalize all #includes. @ text @d37 1 a37 1 * $Id: swapnfs.c,v 1.1 1993/07/07 12:06:40 cgd Exp $ d46 7 a52 9 #include #include #include #include #include #include #include @