Deleted Added
full compact
mount_nfs.c (14024) mount_nfs.c (15770)
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
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/*
44static char sccsid[] = "@(#)mount_nfs.c 8.3 (Berkeley) 3/27/94";
45static char sccsid[] = "@(#)mount_nfs.c 8.3 (Berkeley) 3/27/94";
46*/
47static const char rcsid[] =
48 "$Id$";
45#endif /* not lint */
46
47#include <sys/param.h>
48#include <sys/mount.h>
49#include <sys/socket.h>
50#include <sys/socketvar.h>
51#include <sys/stat.h>
52#include <sys/syslog.h>

--- 24 unchanged lines hidden (view full) ---

77#include <err.h>
78#include <errno.h>
79#include <fcntl.h>
80#include <netdb.h>
81#include <signal.h>
82#include <stdio.h>
83#include <stdlib.h>
84#include <strings.h>
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>
85#include <unistd.h>
86
87#include "mntopts.h"
88
89#ifdef __FreeBSD__
90#define ALTF_BG 0x1
91#define ALTF_NOCONN 0x2
92#define ALTF_DUMBTIMR 0x4

--- 313 unchanged lines hidden (view full) ---

406
407 if (!getnfsargs(spec, nfsargsp))
408 exit(1);
409
410#ifdef __FreeBSD__
411 vfc = getvfsbyname("nfs");
412 if(!vfc && vfsisloadable("nfs")) {
413 if(vfsload("nfs"))
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"))
414 err(1, "vfsload(nfs)");
419 err(EX_OSERR, "vfsload(nfs)");
415 endvfsent(); /* flush cache */
416 vfc = getvfsbyname("nfs");
417 }
420 endvfsent(); /* flush cache */
421 vfc = getvfsbyname("nfs");
422 }
423 if (!vfc)
424 errx(EX_OSERR, "nfs filesystem is not loadable");
418
425
419 if (mount(vfc ? vfc->vfc_index : MOUNT_NFS, name, mntflags, nfsargsp))
426 if (mount(vfc->vfc_index, name, mntflags, nfsargsp))
420#else
421 if (mount(MOUNT_NFS, name, mntflags, nfsargsp))
422#endif
423 err(1, "%s", name);
424 if (nfsargsp->flags & (NFSMNT_NQNFS | NFSMNT_KERB)) {
425 if ((opflags & ISBGRND) == 0) {
426 if (i = fork()) {
427 if (i == -1)

--- 354 unchanged lines hidden ---
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 ---