aboutsummaryrefslogtreecommitdiff
path: root/lib/libstand/open.c
Commit message (Collapse)AuthorAgeFilesLines
* Move lib/libstand to sys/boot/libsaWarner Losh2017-10-121-159/+0
| | | | | | | | | | Move the sources to sys/boot. Make adjustments related to the move. Kill LIBSTAND_SRC since it's no longer needed. Sponsored by: Netflix Notes: svn path=/head/; revision=324551
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* If we can't open the file, skip devclose() for the exclusive_file_systemMarcel Moolenaar2015-10-081-1/+1
| | | | | | | case. We never called devopen(), so we know there's nothing to close. Notes: svn path=/head/; revision=289044
* Provide a means for loaders to control which file system to use. ThisMarcel Moolenaar2014-07-301-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to counteract the default behaviour of always trying each and every file system until one succeeds, or the open fails. The problem with the loader is that we've implemented features based on this behavior. The handling of compressed files is a good example of this. However, it is in general highly undesirable to not have a one-time probe (or taste in the geom lingo), followed by something similar to a mount whenever we (first) read from a device. Everytime we go to the same device, we can reasonably assume it (still) has the same file system. For file systems that need to do far more that a trivial read of a super block, not having something similar to a mount operation is disastrous from a performance (and thus usability) perspective. But, again, since we've implemented features based on this stateless approach, things can get complicated quickly if and when we want to change this. And yet, we sometimes do need stateful behaviour. For this reason, this change simply introduces exclusive_file_system. When set to the fsops of the file system to use, the open call will only try this file system. Setting it to NULL restores the default behaviour. It's a low-cost (low-brow?) approach to provide enough control without re-implementing the guts of the loader. A good example of when this is useful is when we're trying to load files out of a container (say, a software packaga) that itself lives on a file system or is fetched over the network. While opening the container can be done in the normal stateless manner, once it is opened, subsequent opens should only consider the container. Obtained from: Juniper Networks, Inc. Notes: svn path=/head/; revision=269308
* Initialize f_rabuf in the raw device case. A subsequent close()Christian Brueffer2009-10-281-0/+1
| | | | | | | | | | | later on would try to free it, leading to a crash. PR: 93998 Submitted by: neel MFC after: 1 week Notes: svn path=/head/; revision=198542
* Remove California Regent's clause 3, per letterWarner Losh2007-01-091-4/+0
| | | | Notes: svn path=/head/; revision=165906
* Add __FBSDID()s to libstandMatthew Dillon2001-09-301-1/+3
| | | | Notes: svn path=/head/; revision=84221
* Backout last commit. It was wrong.. *sigh*Paul Saab2000-09-101-1/+0
| | | | Notes: svn path=/head/; revision=65655
* include string.h to silence a warning.Paul Saab2000-09-101-0/+1
| | | | Notes: svn path=/head/; revision=65654
* Implement readahead buffering for non-raw files. This drastically improvesMike Smith2000-09-051-0/+9
| | | | | | | | | | | | the efficiency of byte-by-byte read operations on filesystems not already supported by the block cache (especially NFS). This should be a welcome change for users booting via PXE, as the loader now reads its startup files almost instantly, instead of taking tens of seconds. Notes: svn path=/head/; revision=65470
* * Enable old UFS compatibility code for booting from Digital Unix formattedDoug Rabson1998-09-261-1/+1
| | | | | | | | | | disks. * Fix a whole raft of warnings, printf and otherwise. * Make zalloc work for alpha (just a case of using the right typedef). * Add some (disabled) malloc debug printing to stand.h. Notes: svn path=/head/; revision=39672
* This is libstand; a support library for standalone executables (eg. bootstrapMike Smith1998-08-201-0/+137
modules). Obtained from: NetBSD, with some architectural changes and many additions. Notes: svn path=/cvs2svn/branches/MSMITH/; revision=38451