Home | History | Annotate | only in /src/sbin/mount_nfs
History log of /src/sbin/mount_nfs
RevisionDateAuthorComments
 1.24 10-Apr-2011  joerg Extend CPPFLAGS, don't replace it
 1.23 05-Mar-2010  pooka Remove no longer used -DNFS.
 1.22 16-Oct-2008  pooka Convert mount_nfs to the mount_foo_parseargs() format. No functional
change.
 1.21 28-May-2007  tls branches: 1.21.12;
Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry. RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros. Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default. Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
 1.20 23-Mar-2006  wiz Remove Kerberos4/NFSKERB settings.
 1.19 21-Jan-2006  yamt whitespace.
 1.18 21-Jan-2006  dsl Use the rpc code from sys/lib/libsa to determine the root file handle.
Saves the code from depending on the xdr functions.
Tested on i386 and IPv4, may need tweaking for IPv6 and using TCP for the
portmap/mount functions.
 1.17 27-Jun-2005  christos Move WARNS=3 to the Makefile.inc, and add a little const to the remaining
programs that did not compile before.
 1.16 15-May-2005  dsl Split getnfsargs() out into its own file, it drags in 70kB of rpc code.
I might manage to write a version that doesn't pull in all the crud.
(Which will give a load of space in the install floppy images)
 1.15 10-Jan-2005  lukem Only compile in IPv6 support if ${USE_INET6} != "no"

MKINET6 is for providing IPv6 infrastructure.
USE_INET6 is for compiling IPv6 support into the programs (needs MKINET6).
 1.14 11-Apr-2003  christos PR/1472: David Carrel: Add option to specify the nfs port.
This was not done, I added the functionality to be able to parse
port=num in the options. While I was there, I added this for all
the other numeric options: rsize, wsize etc.
 1.13 22-Mar-2003  jdolecek move getmntopts(3) to libutil, build and install also it's manpage
bump libutil minor
adjust individual mount_*/Makefile to use libutil getmntopts(3)
 1.12 21-Sep-2002  christos MNT_GETARGS support
 1.11 19-Aug-2002  lukem Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path
 1.10 10-Oct-1997  christos CFLAGS->CPPFLAGS
 1.9 16-Sep-1997  lukem back to using mount/getmntopts.c since mount is now post lite-2
 1.8 08-May-1997  gwr Back out the .PATH.c changes. The .depend problem (and others)
will be fixed using the new .NOPATH make feature instead.
 1.7 06-May-1997  gwr Use .PATH.c: ...
 1.6 09-Jan-1997  tls it's a shame, but since we have no kernel support for kerb NFS (which may or may not be worth having, in the form available to us) this is how I'm closing PR #2469.
 1.5 18-Feb-1996  fvdl Bring in NFSv3 code by Rick Macklem (from Lite2).
 1.4 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.3 22-Dec-1994  cgd specify man pages the new way.
 1.2 27-Jul-1994  brezak If in a kerberos environment; build -DKERBEROS
 1.1 08-Jun-1994  mycroft branches: 1.1.1; 1.1.2;
Update from 4.4-Lite, with local changes.
 1.1.2.1 06-Sep-1994  cgd from trunk.
 1.1.1.1 13-Jun-1994  mycroft Import 4.4-Lite version.
 1.21.12.1 17-Jan-2009  mjf Sync with HEAD.
 1.3 16-Sep-1997  lukem back to using mount/getmntopts.c since mount is now post lite-2
 1.2 15-Sep-1997  lukem * update for WARNS=1
* getopt returns -1 not EOF
* fix .Nm usage
* deprecate register
* bzero() -> memset()
 1.1 18-Feb-1996  fvdl Temporarily use own getmntopts.c for mount_nfs (the Lite2 version). The other
mount_* commands need to be upgraded to use this version too soon.
 1.18 05-Feb-2017  christos remove debugging printf.
 1.17 03-Feb-2017  christos use the netid value because it could be udp6...
 1.16 29-Jun-2013  christos branches: 1.16.10; 1.16.14;
declare the variables that getnfsargs need in getnfsargs so that they can
easily be used from other programs.
 1.15 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.14 23-Jul-2010  pooka branches: 1.14.6; 1.14.12;
Make it possible to set the retry timeout as a compile-time define.
This is useful for automated environments where everything (rpcbind,
mountd, nfsd and the client) is started in parallel in a split
second and there is a small chance we will race in there before
everything has been communicated to rpcbind.
 1.13 30-Nov-2009  pooka Use getprogname() instead of hardcoding "mount_nfs" to get the
right info in rump_nfs.
 1.12 15-Oct-2008  pooka Reword quite out-of-place (even historically) "nqnfs 2" error message.
 1.11 20-Jul-2008  lukem Remove the \n and tabs from the __COPYRIGHT() strings.
(Tweak some to use a consistent format.)
 1.10 05-Aug-2007  yamt branches: 1.10.10; 1.10.14; 1.10.16;
lengthen timeout. i saw a server for which 10s was not enough.
 1.9 10-Mar-2007  hubertf - removes unused ctype.h header
- correct comment in mount_nfs/getnfsargs.c: s/Nead/Need/

From: Slava Semushin <php-coder@altlinux.ru>
 1.8 27-Dec-2006  yamt remove the rest of Kerberos 4 code.
 1.7 27-Dec-2006  yamt sync with header changes. (nqnfs removal)
 1.6 07-Jul-2006  hubertf Replace strcpy() call with strlcpy() call.
OK'd by christos@
 1.5 20-May-2006  yamt do not keep to use nfsv3 filehandle when falling back to nfsv2.
 1.4 23-Mar-2006  wiz unifdef NFSKERB (Kerberos 4 support). Update man page and usage() for
-K and -m removal (Kerberos 4 specific options).
 1.3 12-Nov-2005  dsl Add a missing break!
Maybe 'mount_nfs -oport=<port>' has been broken since the IPv6 changes.
 1.2 02-Jun-2005  lukem Use ai_nfs instead of the uninitialized ai when determining the NFSMNT_KERB
reverse IP address, and ensure ecode is set as well.
Detected with gcc -Wuninitialized.
(The bug was introduced in mount_nfs.c rev 1.25. Hi fvdl! :)
 1.1 15-May-2005  dsl Split getnfsargs() out into its own file, it drags in 70kB of rpc code.
I might manage to write a version that doesn't pull in all the crud.
(Which will give a load of space in the install floppy images)
 1.10.16.2 05-Aug-2007  yamt lengthen timeout. i saw a server for which 10s was not enough.
 1.10.16.1 05-Aug-2007  yamt file getnfsargs.c was added on branch matt-mips64 on 2007-08-05 22:09:13 +0000
 1.10.14.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.10.10.2 17-Jan-2009  mjf Sync with HEAD.
 1.10.10.1 28-Sep-2008  mjf Sync with HEAD.
 1.14.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.12.1 23-Jun-2013  tls resync from head
 1.14.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.16.14.1 21-Apr-2017  bouyer Sync with HEAD
 1.16.10.1 20-Mar-2017  pgoyette Sync with HEAD
 1.10 29-Jun-2013  christos declare the variables that getnfsargs need in getnfsargs so that they can
easily be used from other programs.
 1.9 06-Jul-2011  mrg branches: 1.9.2; 1.9.8;
switch from an ugly cast and ntohl() usage to be32dec(). use sizeof.
idea from dh, and fixes a GCC 4.5 warning.
 1.8 29-Apr-2008  martin Convert to new 2 clause license
 1.7 10-Mar-2007  hubertf branches: 1.7.12; 1.7.14;
- removes unused ctype.h header
- correct comment in mount_nfs/getnfsargs.c: s/Nead/Need/

From: Slava Semushin <php-coder@altlinux.ru>
 1.6 27-Dec-2006  yamt sync with header changes. (nqnfs removal)
 1.5 07-Jul-2006  hubertf Replace strcpy() call with strlcpy() call.
OK'd by christos@
 1.4 20-May-2006  yamt do not keep to use nfsv3 filehandle when falling back to nfsv2.
 1.3 20-May-2006  yamt replace a magic constant with a macro.
 1.2 20-May-2006  yamt copy missing copyright notices from
getnfsargs.c and sys/arch/i386/stand/libsa/nfs.c.
 1.1 21-Jan-2006  dsl Use the rpc code from sys/lib/libsa to determine the root file handle.
Saves the code from depending on the xdr functions.
Tested on i386 and IPv4, may need tweaking for IPv6 and using TCP for the
portmap/mount functions.
 1.7.14.1 18-May-2008  yamt sync with head.
 1.7.12.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 13-Jan-2009  tsutsui Add workaround typedefs for awful hack.

XXX: It's completely unacceptable for me to refer libsa files from userland.
XXX: Nowadays we no longer have serious size restriction in install media,
XXX: so I think it's much better to simply remove this ugly SMALLPROG hacks.
XXX: If you really want to share files, please move them into src/common
XXX: with defined APIs.
 1.2 29-Apr-2008  martin Convert to new 2 clause license
 1.1 21-Jan-2006  dsl branches: 1.1.20; 1.1.22;
Use the rpc code from sys/lib/libsa to determine the root file handle.
Saves the code from depending on the xdr functions.
Tested on i386 and IPv4, may need tweaking for IPv6 and using TCP for the
portmap/mount functions.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.2 17-Jan-2009  mjf Sync with HEAD.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 16-Sep-1997  lukem back to using mount/getmntopts.c since mount is now post lite-2
 1.2 23-Oct-1996  cgd recognize the 'nocoredump' mount option as a standard option (supported by
all file system types).
 1.1 18-Feb-1996  mycroft This accompanies getmntopts.c.
 1.52 14-Mar-2021  rin Fix typo: s/--r/-r/
 1.51 24-Jan-2021  jmcneill Use 32K as the default NFSv3 read and write data sizes on aarch64, matching
i386 and amd64.
 1.50 03-Oct-2020  wiz New sentence, new line.
 1.49 03-Oct-2020  christos Add -A (noac) option to turn off the attribute cache. (Maciej W. Rozycki)
 1.48 17-May-2018  wiz Remove Tn for standard abbreviations.
 1.47 17-May-2018  thorpej Default NFS mounts to using TCP transport instead of UDP.
PR kern/53166
 1.46 03-Jul-2017  wiz branches: 1.46.4;
Remove workaround for ancient HTML generation code.
 1.45 12-Sep-2016  sevan Add HISTORY section.
Bump date.
Not sure where mount_nfs first showed up but the version in the moder BSDs originates
from 4.4BSD according to CSRG archive
http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.4BSD/usr/src/sbin/mount_nfs
Commercial offerings from Sun and others covers older systems, eg
https://groups.google.com/forum/#!topic/net.unix-wizards/lMe7aQikqJI
 1.44 28-Apr-2015  prlw1 Fix typos
 1.43 11-Jul-2012  dholland minor wording improvement.
 1.42 08-Apr-2012  wiz Remove unnecessary Bk/Ek pairs from SYNOPSIS.
No effective change except where I used the opportunity to sort options
and/or option descriptions.
 1.41 02-Apr-2012  njoly Note that amd64 defaults to 32k read/write data size, just like i386.
 1.40 29-Aug-2011  jruoho branches: 1.40.2;
Remove a comma. From "Snader_LB" on freenode.
 1.39 18-Apr-2009  wiz Remove outdated example. From Todd Kover in PR 41238.
 1.38 08-Apr-2009  joerg Fix string literals.
 1.37 11-Jan-2009  pooka branches: 1.37.2;
-o resport, not -o resvport
 1.36 09-Nov-2007  yamt branches: 1.36.8; 1.36.14;
- fix timeout for -s.
- mention default values of some options.
 1.35 01-Jun-2007  ginsbach branches: 1.35.4;
Add arguments to option descriptions for options that require arguments.
Document all of the NFS specific -o options.
 1.34 27-Dec-2006  wiz Sort options.
 1.33 27-Dec-2006  yamt oops, remove duplicated -D.
 1.32 27-Dec-2006  yamt revive -D option because it actually has some meanings for non-nqnfs mounts.
 1.31 09-Nov-2006  yamt remove nqnfs support.
namely,
- make -q a synonym of -3.
- ignore -L and -D.
 1.30 23-Mar-2006  wiz unifdef NFSKERB (Kerberos 4 support). Update man page and usage() for
-K and -m removal (Kerberos 4 specific options).
 1.29 23-Mar-2006  wiz Fix typo in Xref.
 1.28 20-Jun-2005  peter Change all .Xr config 8 to .Xr config 1, following the recent move of
config from usr.sbin -> usr.bin.

Reviewed by wiz.
 1.27 31-Jan-2005  erh Fix PR#3617 and PR#3205: call realpath to convert mount points and paths to
device nodes into absolute paths before using them.
 1.26 21-Jan-2005  yamt note that loopback mount is a bad idea.
 1.25 05-May-2004  fair Came in here to add nfsstat(1) reference in SEE ALSO,
but since I was here...

Correct spelling of "Kerberos." Add RFC references.
Reword some awkward english. Sprinkle mandoc macros throughout.
Add white space to aid readability. Change date.
 1.24 15-Jan-2004  grant branches: 1.24.2;
uppercase NFS acronym
 1.23 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.22 06-Apr-2003  wiz Some casing changes, and use Er for EINTR.
 1.21 25-Feb-2003  wiz .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
 1.20 01-Jan-2003  jschauma Fix tyops pointed out by Igor Sobrado in PR misc/19623:

mount_filecore(8) - frquently (frequently), upto (up to)
mount_nfs(8) - NFSV3 (NFSv3), automaticly (automatically)
mount_ntfs(8) - particularily (particularly), fisk (disk)
 1.19 01-Oct-2002  wiz New sentence, new line. By Robert Elz with minimal fixes.
 1.18 15-May-2002  simonb In the description of the -r and -w options, match the wording of the
stats to look for from netstat(1) with what netstat actually shows.
 1.17 08-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.16 21-Jan-2002  wiz Use mdoc macros instead of man ones.
 1.15 20-Dec-2001  soren Sync getopt() / man page with actual getopt options.
 1.14 16-Nov-2001  wiz Punctuation nit, and drop two .Pps.
 1.13 02-May-2001  fvdl Remove BUGS section, which only referred to performance tuning.
Instead, add a PERFORMANCE section which explains the most common
optimizations.
 1.12 07-Oct-1999  soren branches: 1.12.6;
NFS over TCP is more common these days.
 1.11 07-Mar-1999  mycroft branches: 1.11.4;
Clean up SYNOPSIS formatting.
 1.10 01-Feb-1999  msaitoh Eliminate unused period.
 1.9 12-Jan-1999  garbled Add an EXAMPLES and ERRORS section to the manpage to partially fix
PR# 6121 by Charles M. Hannum. Someone else will have to do the
fixing to mountd's diagnostics.
 1.8 06-Feb-1998  perry macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.7 19-Oct-1997  fvdl Implement -X option for 32 <-> 64 bit translation of directory cookies
for v3 mounts. Should rarely be needed (i.e. servers actually
returning information in the upper 32 bits, and programs not
being able to deal with that (emulated binaries; native NetBSD
binaries will never need this)).
 1.6 23-Mar-1997  fvdl Use a reserved port by default. The -P option is now obsolete, but
kept for backward compatibility. The -p option was added to explicitly
NOT use reserved ports.
 1.5 26-Nov-1996  mikel Fix typo; PR misc/2956. Also cleaned up .Nm usage.
 1.4 27-Oct-1996  christos Fix PR/2884: Change default for nfs mounts to not do a connect on the
socket. Add option -C to force a connected mount. Now option -c is still
there, but it is the default. Maybe amd should be changed similarly.
 1.3 18-Feb-1996  fvdl Bring in NFSv3 code by Rick Macklem (from Lite2).
 1.2 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.1 08-Jun-1994  mycroft branches: 1.1.1;
Update from 4.4-Lite, with local changes.
 1.1.1.2 09-Jan-1997  tls Import from 4.4BSD-Lite2
 1.1.1.1 13-Jun-1994  mycroft Import 4.4-Lite version.
 1.11.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.12.6.1 02-May-2001  he Pull up revision 1.13 (requested by fvdl):
Add some text explaining NFS performance tuning.
 1.24.2.1 08-May-2004  grant Pull up revision 1.25 (requested by fair in ticket #264):

Came in here to add nfsstat(1) reference in SEE ALSO,
but since I was here...

Correct spelling of "Kerberos." Add RFC references.
Reword some awkward english. Sprinkle mandoc macros throughout.
Add white space to aid readability. Change date.
 1.35.4.1 09-Jan-2008  matt sync with HEAD
 1.36.14.3 19-Apr-2009  snj Pull up following revision(s) (requested by wiz in ticket #707):
sbin/mount_nfs/mount_nfs.8: revision 1.39
Remove outdated example. From Todd Kover in PR 41238.
 1.36.14.2 19-Apr-2009  snj Pull up following revision(s) (requested by wiz in ticket #707):
sbin/mount_nfs/mount_nfs.8: revision 1.38
Fix string literals.
 1.36.14.1 19-Apr-2009  snj Pull up following revision(s) (requested by wiz in ticket #707):
sbin/mount_nfs/mount_nfs.8: revision 1.37
-o resport, not -o resvport
 1.36.8.1 17-Jan-2009  mjf Sync with HEAD.
 1.37.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.40.2.2 30-Oct-2012  yamt sync with head
 1.40.2.1 17-Apr-2012  yamt sync with head
 1.46.4.1 21-May-2018  pgoyette Sync with HEAD
 1.76 03-Jan-2025  rillig mount_nfs: fix a few lint warnings

The options 'K' and 'm:' are neither documented nor handled.
 1.75 21-Dec-2022  chs branches: 1.75.2;
mount_nfs: add missing "A" to getopt string
 1.74 03-Oct-2020  christos branches: 1.74.6;
- centralize number parsing code
- enable -g
- KNF
 1.73 03-Oct-2020  christos Add -A (noac) option to turn off the attribute cache. (Maciej W. Rozycki)
 1.72 17-May-2018  thorpej Default NFS mounts to using TCP transport instead of UDP.
PR kern/53166
 1.71 29-Jun-2013  christos branches: 1.71.26;
declare the variables that getnfsargs need in getnfsargs so that they can
easily be used from other programs.
 1.70 01-Mar-2013  joerg Retire OSI network stack. OK core@
 1.69 29-Aug-2011  joerg branches: 1.69.2; 1.69.8;
Use __dead
 1.68 30-Nov-2009  pooka Use getprogname() instead of hardcoding "mount_nfs" to get the
right info in rump_nfs.
 1.67 03-Apr-2009  pooka Fix bug I introduced in rev 1.64: don't use stack space after
return. pointed out by yamt.
 1.66 20-Feb-2009  yamt nfsdefargs: use designated initializers
 1.65 11-Jan-2009  pooka branches: 1.65.2;
Fix noresport mount option parsing.
 1.64 16-Oct-2008  pooka Convert mount_nfs to the mount_foo_parseargs() format. No functional
change.
 1.63 27-Sep-2008  pooka Assign default value for retrycnt already in data.
XXX: the use of globals would benefit from a loving touch
 1.62 20-Jul-2008  lukem Remove the \n and tabs from the __COPYRIGHT() strings.
(Tweak some to use a consistent format.)
 1.61 30-Nov-2007  yamt branches: 1.61.2; 1.61.8; 1.61.12;
remove an unused variable, nfsproto.
 1.60 16-Jul-2007  pooka branches: 1.60.4;
Make all mount(2) return value error checks against -1. Some file
systems just checked != 0, breaking MNT_GETARGS. Others worked with < 0,
but make them check against -1 too for consistency. And sprinkle some
stylish line wrapping where appropriate.
 1.59 14-Jul-2007  dsl Add additional 'sizeof args' parameter to mount(2).
 1.58 10-Mar-2007  hubertf - removes unused ctype.h header
- correct comment in mount_nfs/getnfsargs.c: s/Nead/Need/

From: Slava Semushin <php-coder@altlinux.ru>
 1.57 27-Dec-2006  yamt remove the rest of Kerberos 4 code.
 1.56 27-Dec-2006  yamt sync with header changes. (nqnfs removal)
 1.55 27-Dec-2006  wiz Sort options in usage.
 1.54 27-Dec-2006  yamt revive -D option because it actually has some meanings for non-nqnfs mounts.
 1.53 09-Nov-2006  yamt remove nqnfs support.
namely,
- make -q a synonym of -3.
- ignore -L and -D.
 1.52 16-Oct-2006  christos use MOPT_NULL
 1.51 20-May-2006  yamt do not keep to use nfsv3 filehandle when falling back to nfsv2.
 1.50 23-Mar-2006  wiz unifdef NFSKERB (Kerberos 4 support). Update man page and usage() for
-K and -m removal (Kerberos 4 specific options).
 1.49 21-Mar-2006  christos Always check the results of getmntopts() and free them.
 1.48 15-May-2005  dsl Split getnfsargs() out into its own file, it drags in 70kB of rpc code.
I might manage to write a version that doesn't pull in all the crud.
(Which will give a load of space in the install floppy images)
 1.47 05-Feb-2005  xtraeme branches: 1.47.2;
Kill __P(), use ANSI function declarations; WARNS=3.
 1.46 31-Jan-2005  erh Fix PR#3617 and PR#3205: call realpath to convert mount points and paths to
device nodes into absolute paths before using them.
 1.45 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22308, verified by myself.
 1.44 23-Jul-2003  itojun include des.h, not kerberosIV/des.h
 1.43 13-Jul-2003  itojun use bounded string op
 1.42 16-May-2003  yamt fix a typo that prevents -o wsize=nnn to work.
 1.41 05-May-2003  yamt remove _KERNEL hack.
 1.40 11-Apr-2003  christos PR/1472: David Carrel: Add option to specify the nfs port.
This was not done, I added the functionality to be able to parse
port=num in the options. While I was there, I added this for all
the other numeric options: rsize, wsize etc.
 1.39 10-Apr-2003  lukem fix typo introduced in previous (print "addr=" instead of "ddr=")
 1.38 07-Apr-2003  fvdl Don't print the version of the argument structure, it's easily confused
with the NFS version.
 1.37 22-Mar-2003  jdolecek use <> rather than "" for #include mntopts.h
 1.36 21-Oct-2002  enami When printing filesystem specific parameters, also print the address and
port of server numerically.
 1.35 01-Oct-2002  itojun KNF
 1.34 21-Sep-2002  christos MNT_GETARGS support
 1.33 16-Jun-2002  wrstuden Catch error code from mount command, and if it's the
error given when we ask for a v3 mount on a v2-only kernel,
*and* we weren't forcing v3, try the mount again as a v2 mount
before erroring out.
 1.32 29-May-2002  cjs When RPC fails, state explicitly which service we were trying to connect to.
 1.31 02-Mar-2002  mrg branches: 1.31.2;
when complaining that we can't lookup a hostname, actually say which
hostname this is...
 1.30 11-Jan-2001  lukem remove unnecessary ":" in openlog ident
 1.29 30-Oct-2000  jdolecek make the code includable into other programs:
* make static all symbols which do not need to be exported
* rename main() to mount_FOO()
* new main() now just calls mount_FOO(), main() is only compiled in if
MOUNT_NOMAIN is not defined
* a_gid(), a_uid() and a_mask() were put into ../mount/fattr.[ch], local
versions removed
 1.28 16-Jul-2000  itojun correct hard-to-understand indentation.
 1.27 26-Jun-2000  bjh21 Remove spurious colon from error message; clnt_pcreateerror provides one.
 1.26 19-Jun-2000  fvdl branches: 1.26.2;
Handle unsupported protocols (i.e. no v6 support on the other side)
a tad better.
 1.25 09-Jun-2000  fvdl Update to be more address-family independent, and adapt to TI-RPC
interface.

XXX this code needs a cleanup, especially the retry-loop.
 1.24 21-Nov-1999  mjl branches: 1.24.2;
Make usage message match actual options.
 1.23 25-Jun-1999  perseant branches: 1.23.4;
Regularize error reporting of mount_* commands for failure of mount(2)
to the form:

mount_xxx: dev on dir: reason for failure
 1.22 14-May-1998  tron branches: 1.22.2;
Get protocol type for "pmap_getport()" from variable "nfsproto" instead of
checking the socket type.
 1.21 01-Apr-1998  kleink No need to include <sys/socketvar.h>.
 1.20 01-Mar-1998  fvdl Merge with Lite2 + local changes
 1.19 03-Feb-1998  perry change <strings.h> to <string.h> to fix compiler warning
 1.18 19-Oct-1997  fvdl Implement -X option for 32 <-> 64 bit translation of directory cookies
for v3 mounts. Should rarely be needed (i.e. servers actually
returning information in the upper 32 bits, and programs not
being able to deal with that (emulated binaries; native NetBSD
binaries will never need this)).
 1.17 15-Sep-1997  lukem * update for WARNS=1
* getopt returns -1 not EOF
* fix .Nm usage
* deprecate register
* bzero() -> memset()
 1.16 12-May-1997  jtk fix typo: PRC should have been RPC
 1.15 23-Mar-1997  fvdl Use a reserved port by default. The -P option is now obsolete, but
kept for backward compatibility. The -p option was added to explicitly
NOT use reserved ports.
 1.14 27-Oct-1996  christos Fix PR/2884: Change default for nfs mounts to not do a connect on the
socket. Add option -C to force a connected mount. Now option -c is still
there, but it is the default. Maybe amd should be changed similarly.
 1.13 23-May-1996  fvdl Be stricter when checking NQNFS and version combinations. Incorrect combinations
of these flags were previously possible when falling back from a v3 -> v2
mount, and could confuse the system.
 1.12 13-Apr-1996  jtc branches: 1.12.4;
Add const qualifier to mopts table
 1.11 18-Feb-1996  fvdl Bring in NFSv3 code by Rick Macklem (from Lite2).
 1.10 21-May-1995  mycroft Use inet_aton(), not inet_addr().
 1.9 28-Mar-1995  jtc KERNEL -> _KERNEL
 1.8 18-Mar-1995  cgd convert to new RCS Id conventions; reduce my headache
 1.7 29-Dec-1994  cgd fix bug 547. it looks like somebody mis-pasted. kirk has been informed.
 1.6 23-Sep-1994  mycroft Eliminate uses of some obsolete functions.
 1.5 17-Sep-1994  mycroft Get the root filehandle using the same transport as the mount itself. From
Ken Hornstein.
 1.4 05-Sep-1994  mycroft Fix incorrect error messages.
 1.3 27-Jul-1994  brezak Use default realm instead of constant
 1.2 24-Jun-1994  pk branches: 1.2.2;
Make numerical IP addresses work (fix from Christos Zoulas).
 1.1 08-Jun-1994  mycroft branches: 1.1.1;
Update from 4.4-Lite, with local changes.
 1.1.1.2 09-Jan-1997  tls Import from 4.4BSD-Lite2
 1.1.1.1 13-Jun-1994  mycroft Import 4.4-Lite version.
 1.2.2.1 06-Sep-1994  cgd from trunk.
 1.12.4.1 25-May-1996  fvdl Pull in options-combinations bugfix from main branch.
 1.22.2.1 05-Sep-1999  he Pull up revision 1.23:
Regularize error reporting of mount_* commands for failure of
mount(2) to the form "mount_xxx: dev on dir: reason for failure"
(as opposed to the old "mount_xxx: : reason for failure").
(perseant)
 1.23.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.24.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.26.2.1 03-Jul-2000  thorpej Pull up rev. 1.27:
Remove spurious colon from error message; clnt_pcreateerror provides one.
 1.31.2.1 18-Jun-2002  lukem Pull up revision 1.33 (requested by wrstuden in ticket #290):
Catch error code from mount command, and if it's the
error given when we ask for a v3 mount on a v2-only kernel,
*and* we weren't forcing v3, try the mount again as a v2 mount
before erroring out.
 1.47.2.1 11-Jun-2005  tron Apply patch (requested by lukem in ticket #391):
Use ai_nfs instead of the uninitialized ai when determining the
NFSMNT_KERB reverse IP address, and ensure ecode is set as well.
(Fix derived from getnfsargs.c 1.2)
 1.60.4.1 09-Jan-2008  matt sync with HEAD
 1.61.12.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.61.8.2 17-Jan-2009  mjf Sync with HEAD.
 1.61.8.1 28-Sep-2008  mjf Sync with HEAD.
 1.61.2.2 30-Nov-2007  yamt remove an unused variable, nfsproto.
 1.61.2.1 30-Nov-2007  yamt file mount_nfs.c was added on branch mjf-devfs on 2007-11-30 16:13:16 +0000
 1.65.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.69.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.69.8.1 23-Jun-2013  tls resync from head
 1.69.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.71.26.1 21-May-2018  pgoyette Sync with HEAD
 1.74.6.1 21-Dec-2022  martin Pull up following revision(s) (requested by chs in ticket #18):

sbin/mount_nfs/mount_nfs.c: revision 1.75

mount_nfs: add missing "A" to getopt string
 1.75.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 29-Jun-2013  christos declare the variables that getnfsargs need in getnfsargs so that they can
easily be used from other programs.
 1.2 16-Oct-2008  pooka branches: 1.2.18; 1.2.24;
Convert mount_nfs to the mount_foo_parseargs() format. No functional
change.
 1.1 15-May-2005  dsl branches: 1.1.20;
Split getnfsargs() out into its own file, it drags in 70kB of rpc code.
I might manage to write a version that doesn't pull in all the crud.
(Which will give a load of space in the install floppy images)
 1.1.20.1 17-Jan-2009  mjf Sync with HEAD.
 1.2.24.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.18.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2 29-Apr-2008  martin Convert to new 2 clause license
 1.1 21-Jan-2006  dsl branches: 1.1.20; 1.1.22;
Use the rpc code from sys/lib/libsa to determine the root file handle.
Saves the code from depending on the xdr functions.
Tested on i386 and IPv4, may need tweaking for IPv6 and using TCP for the
portmap/mount functions.
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.

RSS XML Feed