freebsd-skq/lib/libstand
bapt de8fd9d88b Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi
Add a new 'netproto' variable which can be set for now to
NET_TFTP or NET_NFS (default to NET_NONE)

From the dhcp options if one sets the root-path option to:
"ip:path", the loader will consider it is booting over NFS
(meaning same behaviour as the default current behaviour)

if the dhcp option "tftp server address" is set (option 150)
the loader will consider it is booting over tftpfs, it will then
consider the root-path options with 2 possible case
1. "path" then the IP of the tftp server will be the one passed by
the option 150, and the files will be retrieved under "path" on the tftp
server
2. "ip:path" then the IP of the tftp server will be the one passed in
the option "overwritting the IP from the option 150.

We could not "abuse" the rootpath option in the form or tftp://ip:path because
this is already used for other purpose by iPXE preventing any chainload from
iPXE to the FreeBSD loader.

Given at each open(), the loader loops over all available filesystems and keep
the "best" error, we needed to prevent tftpfs to fallback on nfs and vice versa.
the tftpfs and nfs implementation in libstand now return EINVAL early if
'netproto' for that purpose.

Reviewed by:	tsoome
Relnotes:	yes
Sponsored by:	Gandi.net
Differential Revision:	https://reviews.freebsd.org/D7628
2016-08-31 13:16:40 +00:00
..
amd64
i386
mips
powerpc Fix loader on PowerPC following r279784. It turns out that, due to .PATH 2015-03-09 02:19:44 +00:00
sparc64
__main.c
arp.c
assert.c
bcd.c
bootp.c Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi 2016-08-31 13:16:40 +00:00
bootp.h Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi 2016-08-31 13:16:40 +00:00
bootparam.c
bootparam.h
bzipfs.c
cd9660.c A new implementation of the loader block cache 2016-04-18 23:09:22 +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 Unused variables and cstyle fix for loader dosfs 2016-08-26 14:58:57 +00:00
dosfs.h A new implementation of the loader block cache 2016-04-18 23:09:22 +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 A new implementation of the loader block cache 2016-04-18 23:09:22 +00:00
fstat.c
getopt.c
gets.c
globals.c Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi 2016-08-31 13:16:40 +00:00
gzipfs.c
in_cksum.c
inet_ntoa.c
ioctl.c
iodesc.h
libstand.3 Fix usage example in kvprintf(9) and its copy in libstand(3): trailing '\n' 2015-01-23 07:30:57 +00:00
lseek.c
Makefile MFH 2016-04-04 23:55:32 +00:00
Makefile.depend DIRDEPS_BUILD: Regenerate without local dependencies. 2016-02-24 17:20:11 +00:00
nandfs.c libstand: make more use of the howmany() macro when available. 2016-04-26 01:19:36 +00:00
net.c
net.h Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi 2016-08-31 13:16:40 +00:00
netif.c
netif.h
nfs.c Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi 2016-08-31 13:16:40 +00:00
nfsv2.h
nullfs.c
open.c If we can't open the file, skip devclose() for the exclusive_file_system 2015-10-08 17:59:05 +00:00
pager.c
pkgfs.c Add pkgfs, a file system implementation for reading files out of a 2014-07-31 23:25:13 +00:00
printf.c Add support for %S to libstand as well so /boot/loader and friends can 2016-05-17 21:23:13 +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 A new implementation of the loader block cache 2016-04-18 23:09:22 +00:00
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 A new implementation of the loader block cache 2016-04-18 23:09:22 +00:00
stat.c
strcasecmp.c
strdup.c
strerror.c
strtol.c libstand: use NULL instead of zero for pointers. 2016-04-18 14:45:56 +00:00
strtoul.c
tftp.c Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi 2016-08-31 13:16:40 +00:00
tftp.h
twiddle.c Add a divisor parameter to twiddle() so that callers can request that output 2014-12-22 20:42:36 +00:00
udp.c
ufs.c A new implementation of the loader block cache 2016-04-18 23:09:22 +00:00
uuid_from_string.c Fix a bug in the parsing code: always use the len and not 8. 2016-05-20 05:33:26 +00:00
uuid_to_string.c Make tohex() work as expected. 2016-01-09 08:04:29 +00:00
write.c A new implementation of the loader block cache 2016-04-18 23:09:22 +00:00
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
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
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