summaryrefslogtreecommitdiffstats
path: root/lib/libstand/nfs.c
Commit message (Collapse)AuthorAgeFilesLines
* libstand: use NULL instead of zero for pointers.pfg2016-04-181-6/+6
|
* Add a divisor parameter to twiddle() so that callers can request that outputian2014-12-221-2/+2
| | | | | | | | | | | | only happen on every Nth call. Update the existing twiddle() calls done in various IO loops to roughly reflect the relative IO sizes. That is, tftp and nfs call twiddle() on every 1K block, ufs on every filesystem block, so the network calls now use a much larger divisor than disk IO calls. Also add a new twiddle_divisor() function that allows an application to set a global divisor that is applied on top of the per-call divisors. Nothing calls this yet, but loader(8) will be using it to further throttle the cursor for slow serial consoles.
* Move pos++ out of the complicated equation, introduced at r240780.mav2013-07-011-2/+3
| | | | | | | | There is an oppinion that result of that equation is compiler-specific. Submitted by: dt71@gmx.com, kientzle Reviewed by: rmacklem MFC after: 3 days
* Revert r240850 and remove redundant NULL check before free(3).kevlo2012-09-241-8/+4
| | | | | | free(3) handles NULL parameter fine. Reviewed by: kib, Garrett Cooper
* Avoid NULL dereferencekevlo2012-09-231-2/+4
|
* Make nfs_readdir() more careful about using response data, cached in globalmav2012-09-211-20/+24
| | | | | | buffer. For now it fixes bug when following `ls` command will return data from previous one aborted by pager. Also it should allow to read several directories same time, for example, for recursive tracerse.
* Don't use global nfs_root_node variable as per-file storage. There aremav2012-09-211-51/+35
| | | | fields that should be file-specific.
* Modify lib/libstand/nfs.c to use NFSv3 instead of NFSv2.rmacklem2010-09-021-2/+742
| | | | | | | | | | | | This allows the nfs_getrootfh() function to return the correct file handle size to pxe.c for pxeboot. It also results in NFSv2 no longer being used by default anywhere in FreeBSD. If built with OLD_NFSV2 defined, the old code that predated this patch will be built and NFSv2 will be used. Tested by: danny at cs.huji.ac.il MFC after: 2 weeks
* ANSIfy, whitespace and comment adjustments, to simplify comparing theseemaste2009-09-131-57/+29
| | | | files with NetBSD / OpenBSD versions.
* use the correct variable in a debug message.luigi2008-11-211-1/+1
|
* On i386, don't try to do network-type stuff if the device name is'nt pxeN.dfr2008-04-051-0/+7
|
* Clean up error handling in libstand filesystem code to be more consistent:jhb2004-01-211-2/+3
| | | | | | | | | | | | | | | - bzipfs and gzipfs now properly return errno values directly from their read routines rather than returning -1. - missing errno values on error returns for the seek routines on almost all filesystems were added. - fstat() now returns -1 if an error occurs rather than ignoring it. - nfs's readdir() routine now reports valid errno values if an error or EOF occurs rather than EPERM (It was just returning 0 for success and 1 for failure). - nullfs used the wrong semantics for every function besides close() and seek(). Getting it right for close() appears to be an accident at that. - read() for buffered files no longer returns 0 (EOF) if an error occurs, but returns -1 instead.
* Fix a machine check abort caused by the EFI loader trying to open amarcel2003-03-031-1/+2
| | | | | | | | | | | | | | | | | | file in the NFS file system when the underlying device is not a network device. A Sparc64 specific hack for this exact problem was already present (nfs.c:1.9, tftp.c:1.10), but the problem is not specific to Sparc64. The hack has been promoted to a non-i386 test because on non-i386 architectures it's either impossible to have non-network devices coexist in the same loader with the NFS FS, or network and non-network device coexist and NFS filesystems can only be used on top of network devices. I believe i386 pxeboot is where this does not hold. The root cause of this problem is in open.c where each file system is tried until no more file systems exist or a file system returns success. There's no notion of a list of valid file systems given the underlying device and the non-existence of a file can cause the invalid combination to be tried.
* Stash various networking paramters in the environment for the kerneljake2002-07-311-1/+15
| | | | to pick up, ala pxe.
* Add a hack (kludge?) to avoid trying to access files backed by diskjake2002-07-071-0/+4
| | | | devices as though they were backed by network devices.
* Remove 'register' keyword.obrien2002-03-211-13/+13
|
* Add __FBSDID()s to libstanddillon2001-09-301-1/+3
|
* Expose the NFS root node, so that an evil consumer can use it to get themsmith2000-09-051-1/+1
| | | | NFS filehandle for the root mount.
* Add readdir support to the NFS filesystem in libstand.ps2000-05-011-1/+80
|
* Do not attempt to free a nfs node if it is the root node. The rootps2000-05-011-2/+3
| | | | | node is statically allocated and is not guarded, so free will panic in nfs_close.
* Add a readdir function to the loader fsops vector, and implement thejlemon2000-04-291-2/+9
| | | | functionality for some of the filesystesms.
* Path arguments to *_open functions should be const, but we were manglingmsmith1998-09-181-7/+13
| | | | | | them. Submitted by: write-protected text segment in BTX
* This is libstand; a support library for standalone executables (eg. bootstrapmsmith1998-08-201-0/+653
modules). Obtained from: NetBSD, with some architectural changes and many additions.
OpenPOWER on IntegriCloud