Deleted Added
sdiff udiff text old ( 216725 ) new ( 221124 )
full compact
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

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

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41static char sccsid[] = "@(#)mount_nfs.c 8.11 (Berkeley) 5/4/95";
42#endif /* not lint */
43#endif
44#include <sys/cdefs.h>
45__FBSDID("$FreeBSD: head/sbin/mount_nfs/mount_nfs.c 221124 2011-04-27 17:51:51Z rmacklem $");
46
47#include <sys/param.h>
48#include <sys/linker.h>
49#include <sys/module.h>
50#include <sys/mount.h>
51#include <sys/socket.h>
52#include <sys/stat.h>
53#include <sys/syslog.h>

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

268 } else if (strcmp(opt, "nfsv2") == 0) {
269 pass_flag_to_nmount=0;
270 mountmode = V2;
271 } else if (strcmp(opt, "nfsv3") == 0) {
272 mountmode = V3;
273 } else if (strcmp(opt, "nfsv4") == 0) {
274 pass_flag_to_nmount=0;
275 mountmode = V4;
276 fstype = "nfs";
277 nfsproto = IPPROTO_TCP;
278 if (portspec == NULL)
279 portspec = "2049";
280 } else if (strcmp(opt, "port") == 0) {
281 pass_flag_to_nmount=0;
282 asprintf(&portspec, "%d",
283 atoi(val));
284 if (portspec == NULL)

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

376 spec = *argv++;
377 name = *argv;
378
379 if (retrycnt == -1)
380 /* The default is to keep retrying forever. */
381 retrycnt = 0;
382
383 /*
384 * If the fstye is "oldnfs", run the old NFS client unless the
385 * "nfsv4" option was specified.
386 */
387 if (strcmp(fstype, "nfs") == 0) {
388 if (modfind("nfscl") < 0) {
389 /* Not present in kernel, try loading it */
390 if (kldload("nfscl") < 0 ||
391 modfind("nfscl") < 0)
392 errx(1, "nfscl is not available");
393 }
394 }
395

--- 819 unchanged lines hidden ---