1/* 2 * Copyright (c) 1992, 1993, 1994 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 --- 27 unchanged lines hidden (view full) --- 36 37#ifndef lint 38static char copyright[] = 39"@(#) Copyright (c) 1992, 1993, 1994\n\ 40 The Regents of the University of California. All rights reserved.\n"; 41#endif /* not lint */ 42 43#ifndef lint |
44/* |
45static char sccsid[] = "@(#)mount_nfs.c 8.3 (Berkeley) 3/27/94"; |
46*/ 47static const char rcsid[] = 48 "$Id$"; |
49#endif /* not lint */ 50 51#include <sys/param.h> 52#include <sys/mount.h> 53#include <sys/socket.h> 54#include <sys/socketvar.h> 55#include <sys/stat.h> 56#include <sys/syslog.h> --- 24 unchanged lines hidden (view full) --- 81#include <err.h> 82#include <errno.h> 83#include <fcntl.h> 84#include <netdb.h> 85#include <signal.h> 86#include <stdio.h> 87#include <stdlib.h> 88#include <strings.h> |
89#include <sysexits.h> |
90#include <unistd.h> 91 92#include "mntopts.h" 93 94#ifdef __FreeBSD__ 95#define ALTF_BG 0x1 96#define ALTF_NOCONN 0x2 97#define ALTF_DUMBTIMR 0x4 --- 313 unchanged lines hidden (view full) --- 411 412 if (!getnfsargs(spec, nfsargsp)) 413 exit(1); 414 415#ifdef __FreeBSD__ 416 vfc = getvfsbyname("nfs"); 417 if(!vfc && vfsisloadable("nfs")) { 418 if(vfsload("nfs")) |
419 err(EX_OSERR, "vfsload(nfs)"); |
420 endvfsent(); /* flush cache */ 421 vfc = getvfsbyname("nfs"); 422 } |
423 if (!vfc) 424 errx(EX_OSERR, "nfs filesystem is not loadable"); |
425 |
426 if (mount(vfc->vfc_index, name, mntflags, nfsargsp)) |
427#else 428 if (mount(MOUNT_NFS, name, mntflags, nfsargsp)) 429#endif 430 err(1, "%s", name); 431 if (nfsargsp->flags & (NFSMNT_NQNFS | NFSMNT_KERB)) { 432 if ((opflags & ISBGRND) == 0) { 433 if (i = fork()) { 434 if (i == -1) --- 354 unchanged lines hidden --- |