freebsd-nq/lib/libstand
Marcel Moolenaar f2fb1d4531 Provide a means for loaders to control which file system to use. This
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.
2014-07-30 16:08:16 +00:00
..
amd64 Move the 64-bit _setjmp to lib/libstand. 2012-12-21 15:15:35 +00:00
i386
mips Merge @228176 from Perforce to fix a bug introduced in r249553: 2013-04-28 14:40:29 +00:00
powerpc Make libstand setjmp work for both 64- and 32-bit ABIs. 2014-02-07 14:24:36 +00:00
sparc64
__main.c Switch to ANSI function prototypes in a few places. 2011-05-03 04:44:50 +00:00
arp.c
assert.c
bcd.c
bootp.c Replace index() and rindex() calls with strchr() and strrchr(). 2012-01-03 18:51:58 +00:00
bootp.h
bootparam.c
bootparam.h
bswap.c Consitently use "__LP64__". 2012-05-24 21:44:46 +00:00
bzipfs.c
cd9660.c Switch to ANSI function prototypes in a few places. 2011-05-03 04:44:50 +00:00
close.c Clear f_rabuf after freeing the memory it points to. This prevents a 2013-12-18 04:52:30 +00:00
closeall.c
dev.c
dosfs.c Fix readdir for the root directory on a FAT32 file system. The root 2013-12-19 05:23:10 +00:00
dosfs.h Fix readdir for the root directory on a FAT32 file system. The root 2013-12-19 05:23:10 +00:00
environment.c Fix an inappropriate free of a non-dynamic value. While here, make the 2013-12-18 17:03:43 +00:00
ether.c
ext2fs.c libstand: Reset the seek pointer in ext2fs as done in UFS. 2013-06-09 01:19:22 +00:00
fstat.c
getopt.c Switch to ANSI function prototypes in a few places. 2011-05-03 04:44:50 +00:00
gets.c
globals.c
gzipfs.c
in_cksum.c
inet_ntoa.c
ioctl.c
iodesc.h
libstand.3 use .Mt to mark up email addresses consistently (part3) 2014-06-23 08:23:05 +00:00
lseek.c
Makefile Remove ia64. 2014-07-07 00:27:09 +00:00
nandfs.c Make this WARNS=9 clean on i386 w/ clang. 2013-03-02 05:28:55 +00:00
net.c In sendrecv function, change the receive timeout value between retries 2011-06-15 21:58:01 +00:00
net.h Increase maximum network timeout from 20s to 120s. Given that an ETIMEDOUT 2010-09-28 01:30:49 +00:00
netif.c
netif.h
nfs.c Move pos++ out of the complicated equation, introduced at r240780. 2013-07-01 17:23:13 +00:00
nfsv2.h
nullfs.c
open.c Provide a means for loaders to control which file system to use. This 2014-07-30 16:08:16 +00:00
pager.c
printf.c style(9) requires an empty line when function have no local variables. 2014-05-30 10:18:01 +00:00
qdivrem.c libstand's qdivrem.c assumes that sizeof(int) == sizeof(long), this is not 2014-07-24 19:06:15 +00:00
quad.h libstand's qdivrem.c assumes that sizeof(int) == sizeof(long), this is not 2014-07-24 19:06:15 +00:00
random.c
rarp.c
read.c
readdir.c
rpc.c
rpc.h
rpcv2.h
saioctl.h
sbrk.c Set the malloc alignment to 64 bytes on platforms that use the U-Boot API 2014-02-05 22:53:58 +00:00
splitfs.c
stand.h Provide a means for loaders to control which file system to use. This 2014-07-30 16:08:16 +00:00
stat.c
strcasecmp.c
strdup.c
strerror.c
strtol.c
strtoul.c Fix includes for use in libstand. 2013-02-19 17:09:23 +00:00
tftp.c Unbreak zfsloader with LOADER_TFTP_SUPPORT on 2013-10-09 21:33:19 +00:00
tftp.h
twiddle.c
udp.c Add #include <netinet/in_pcb.h> for missing forward declation of 2011-05-03 07:39:54 +00:00
ufs.c
write.c
zalloc_defs.h Set the malloc alignment to 64 bytes on platforms that use the U-Boot API 2014-02-05 22:53:58 +00:00
zalloc_malloc.c - Removing some unneeded definitions of NULL(cruft related to 1970's C). 2011-07-10 07:25:34 +00:00
zalloc_mem.h Set the malloc alignment to 64 bytes on platforms that use the U-Boot API 2014-02-05 22:53:58 +00:00
zalloc_protos.h - Removing some unneeded definitions of NULL(cruft related to 1970's C). 2011-07-10 07:25:34 +00:00
zalloc.c Set the malloc alignment to 64 bytes on platforms that use the U-Boot API 2014-02-05 22:53:58 +00:00