1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 35 unchanged lines hidden (view full) --- 44static char sccsid[] = "@(#)nfsiod.c 8.3 (Berkeley) 2/22/94"; 45#endif not lint 46 47#include <sys/param.h> 48#include <sys/ioctl.h> 49#include <sys/syslog.h> 50#include <sys/ucred.h> 51#include <sys/wait.h> |
52#include <sys/mount.h> |
53 54#include <nfs/nfsv2.h> 55#include <nfs/nfs.h> 56 57#include <err.h> 58#include <errno.h> 59#include <fcntl.h> 60#include <signal.h> --- 18 unchanged lines hidden (view full) --- 79 * improve throughput. 80 */ 81int 82main(argc, argv) 83 int argc; 84 char *argv[]; 85{ 86 int ch, num_servers; |
87 struct vfsconf *vfc; |
88 |
89 vfc = getvfsbyname("nfs"); 90 if(!vfc && vfsisloadable("nfs")) { 91 if(vfsload("nfs")) 92 err(1, "vfsload(nfs)"); 93 endvfsent(); /* flush cache */ 94 vfc = getvfsbyname("nfs"); 95 } 96 97 if(!vfc) { 98 errx(1, "NFS support is not available in the running kernel"); 99 } 100 |
101#define MAXNFSDCNT 20 102#define DEFNFSDCNT 1 103 num_servers = DEFNFSDCNT; 104 while ((ch = getopt(argc, argv, "n:")) != EOF) 105 switch (ch) { 106 case 'n': 107 num_servers = atoi(optarg); 108 if (num_servers < 1 || num_servers > MAXNFSDCNT) { --- 73 unchanged lines hidden --- |