Home | History | Annotate | Download | only in nfs
History log of /src/sys/nfs/nfs_bootparam.c
RevisionDateAuthorComments
 1.40  05-Jul-2024  rin sys: Drop redundant NULL check before m_freem(9)

m_freem(9) safely has accepted NULL argument at least since 4.2BSD:
https://www.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/sys/sys/uipc_mbuf.c

Compile-tested on amd64/ALL.

Suggested by knakahara@
 1.39  29-Jun-2019  kamil Appease GCC and initialize arps_ip

Fixes build as GCC errors with maybe-uninitialized that is a false
positive.
 1.38  12-Sep-2013  drochner branches: 1.38.30;
tyop in comment, from Eivind Evensen via OpenBSD
 1.37  21-Mar-2010  chs branches: 1.37.8; 1.37.18; 1.37.22;
in nfs_bootparam(), set the corresponding flag for each field that we fill in.
 1.36  02-Mar-2010  pooka branches: 1.36.2;
Get rid of dependency on fs_nfs.h, i.e. source modules with
conditional content depending on if the NFS client is wanted or
not. The server can now be made an independent module not depending
on the nfs client.

Tested with rump_nfs (standalone client), rump_nfsd (standalone
nfsd) and a qemu installation with both the client and the server.
 1.35  19-Nov-2008  ad branches: 1.35.6;
Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
 1.34  27-Oct-2008  cegger change nfs boot behaviour to automatically try next boot method if boot information are incomplete to succeed.
That way, it is possible combine static and dhcp boot:
For example, to boot diskless you can specify the nfs-server and the rootpath statically. All other information will be taken via dhcp.

Patch has been presented on port-xen, tech-kern and tech-net:
http://mail-index.netbsd.org/port-xen/2008/10/24/msg004488.html
http://mail-index.netbsd.org/tech-kern/2008/10/24/msg003255.html
http://mail-index.netbsd.org/tech-net/2008/10/24/msg000864.html

No comments, no objections.
 1.33  24-Oct-2008  cegger branches: 1.33.2;
- ansify function definition
- de- __P
- u_int32_t -> uint32_t

No functional changes.
 1.32  28-Apr-2008  martin branches: 1.32.6;
Remove clause 3 and 4 from TNF licenses
 1.31  02-Jan-2008  yamt branches: 1.31.6; 1.31.8; 1.31.10;
use kmem_alloc instead of malloc.
 1.30  04-Mar-2007  christos branches: 1.30.16; 1.30.22; 1.30.28;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.29  15-Apr-2006  christos branches: 1.29.14;
m_freem takes one arg.
 1.28  15-Apr-2006  christos s/mfree/m_freem/
 1.27  15-Apr-2006  christos Don't leak mbufs on error.
 1.26  11-Dec-2005  christos branches: 1.26.4; 1.26.6; 1.26.8; 1.26.10; 1.26.12;
merge ktrace-lwp.
 1.25  29-May-2005  christos branches: 1.25.2;
- sprinkle const
- avoid shadowed variables
- mark bad const use with XXXUNCONST
 1.24  22-May-2004  jonathan Eliminate several uses of `curproc' from the socket-layer code and from NFS.

Add a new explicit `struct proc *p' argument to socreate(), sosend().
Use that argument instead of curproc. Follow-on changes to pass that
argument to socreate(), sosend(), and (*so->so_send)() calls.
These changes reviewed and independently recoded by Matt Thomas.

Changes to soreceive() and (*dom->dom_exernalize() from Matt Thomas:
pass soreceive()'s struct uio* uio->uio_procp to unp_externalize().
Eliminate curproc from unp_externalize. Also, now soreceive() uses
its uio->uio_procp value, pass that same value downward to
((pr->pru_usrreq)() calls for consistency, instead of (struct proc * )0.

Similar changes in sys/nfs to eliminate (most) uses of curproc,
either via the req-> r_procp field of a struct nfsreq *req argument,
or by passing down new explicit struct proc * arguments.

Reviewed by: Matt Thomas, posted to tech-kern.
NB: The (*pr->pru_usrreq)() change should be tested on more (all!) protocols.
 1.23  29-Jun-2003  fvdl branches: 1.23.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.22  28-Jun-2003  darrenr Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
 1.21  01-Feb-2003  thorpej Add extensible malloc types, adapted from FreeBSD. This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant. Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
 1.20  22-Sep-2002  jdolecek <sys/conf.h> and <sys/device.h> are not needed here
 1.19  10-Nov-2001  lukem add RCSIDs
 1.18  13-Oct-2001  simonb branches: 1.18.2;
Remove so variables that are only ever set and never referenced.
 1.17  03-Oct-2000  chs branches: 1.17.2; 1.17.4;
include opt_inet.h, needed by previous check-in.
 1.16  02-Oct-2000  itojun perform reverse ARP only if INET is compiled into the kernel
 1.15  26-Jul-1999  enami branches: 1.15.2;
Don't use the result of inet_ntoa after calling the another inet_ntoa,
since they share the same static storage.
 1.14  07-May-1999  drochner -print diskless boot related IP addresses in dot notation
-arrange gateway code to fall back to the old method if the new "getfile"
is not answered (and both are enabled -- allow to switch off the new
method for symmetry)
-handle error if setting the netmask fails
 1.13  12-Apr-1999  ross libkern just got an inet_addr(), but it won't compile, no prototype. Cleanup...
* Add prototype to libkern.h.
* Remove the almost-identical-copy from libsa/net.[ch].
* Change its type back to the (wrong, but harmless) historical one. (u_long)
* Kill the XXX local prototype in nfs_bootparam.c
 1.12  11-Apr-1999  gwr Enable the code that gets our gateway+netmask from the
bootparam server using the "gateway" pseudo file.
(Compatible with sys/lib/libsa/dev_net.c)
 1.11  21-Feb-1999  drochner branches: 1.11.4;
restructure the diskless NFS boot code to keep track of the used
interface and the address allocated, to roll everything back if the
mount fails:
-put an interface pointer into "struct nfs_diskless" to have it
available for cleanup, don't pass it around anymore where the
"struct nfs_diskless" is already passed
-add a "cleanup" function which shuts the interface down
-in the protocol-specific parts, either return with "everything
ready" or "completely shut down"
-use common functions for interface initialization and shutdown
-add a function to delete all routes associate to an interface
(why is this necessary and not done by ~IFF_UP?)
g/c diskless swap stuff
general cleanup
 1.10  13-Sep-1998  christos Fix copyright spacing.
 1.9  09-Aug-1998  perry bzero->memset, bcopy->memcpy, bcmp->memcmp
 1.8  13-Jun-1998  tv Fix boogered gcc warning workaround the right way.
 1.7  01-Mar-1998  veego Add two includes for the 'struct nfs_args' so it compiles again.
 1.6  12-Jan-1998  scottr Consolidate NFS_BOOT_* options into opt_nfs_boot.h
 1.5  09-Jan-1998  drochner Conditionalize call to RARP, check interface type.
(This file can now be included even if no ARP capable interfaces are
defined.)
 1.4  12-Dec-1997  gwr Temporarily disable the bootparam "gateway" support.
 1.3  10-Dec-1997  gwr Change the format of the bootparam "gateway" parameter string to
gateway=server:255.255.255.0 because that is the perferred format,
and the sys/libsa code already knows how to parse that format.
(Copied ip_convert here from the libsa code.)
 1.2  09-Sep-1997  gwr branches: 1.2.2;
Circumvent the lack of a reliable gateway/netmask value in the
Sun RPC bootparam/whoami return by requesting a "pseudo file"
named "gateway" and using its contents as the gateway:netmask
Example /etc/bootparams line: client gateway=router:0xfffffff0
 1.1  29-Aug-1997  gwr branches: 1.1.2;
Support for RARP,RPC/bootparam moved from nfs_boot.c to here.
 1.1.2.3  16-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.2  01-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.1.2.1  29-Aug-1997  thorpej file nfs_bootparam.c was added on branch marc-pcmcia on 1997-09-01 21:02:56 +0000
 1.2.2.1  14-Dec-1997  mellon Pull rev 1.3 and 1.4 up from trunk (gwr)
 1.11.4.2  02-Aug-1999  thorpej Update from trunk.
 1.11.4.1  21-Jun-1999  thorpej Sync w/ -current.
 1.15.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
 1.17.4.2  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.17.4.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.17.2.3  18-Oct-2002  nathanw Catch up to -current.
 1.17.2.2  14-Nov-2001  nathanw Catch up to -current.
 1.17.2.1  22-Oct-2001  nathanw Catch up to -current.
 1.18.2.1  12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.23.2.5  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.23.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.23.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.23.2.2  03-Aug-2004  skrll Sync with HEAD
 1.23.2.1  02-Jul-2003  darrenr Apply the aborted ktrace-lwp changes to a specific branch. This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it. This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.
 1.25.2.3  21-Jan-2008  yamt sync with head
 1.25.2.2  03-Sep-2007  yamt sync with head.
 1.25.2.1  21-Jun-2006  yamt sync with head.
 1.26.12.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.26.10.1  19-Apr-2006  elad sync with head.
 1.26.8.1  24-May-2006  yamt sync with head.
 1.26.6.1  22-Apr-2006  simonb Sync with head.
 1.26.4.1  09-Sep-2006  rpaulo sync with head
 1.29.14.1  12-Mar-2007  rmind Sync with HEAD.
 1.30.28.1  02-Jan-2008  bouyer Sync with HEAD
 1.30.22.1  18-Feb-2008  mjf Sync with HEAD.
 1.30.16.1  09-Jan-2008  matt sync with HEAD
 1.31.10.4  11-Aug-2010  yamt sync with head.
 1.31.10.3  11-Mar-2010  yamt sync with head
 1.31.10.2  04-May-2009  yamt sync with head.
 1.31.10.1  16-May-2008  yamt sync with head.
 1.31.8.1  18-May-2008  yamt sync with head.
 1.31.6.2  17-Jan-2009  mjf Sync with HEAD.
 1.31.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.32.6.1  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.33.2.1  19-Jan-2009  skrll Sync with HEAD.
 1.35.6.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.36.2.1  30-May-2010  rmind sync with head
 1.37.22.1  18-May-2014  rmind sync with head
 1.37.18.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.37.8.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.38.30.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411

RSS XML Feed