EFI loader: only open/close on the net device with tftpfs

It prevents issuing a dhcp request before each file open
As a consequence netbooting over tftpfs is significantly faster

Sponsored by:	Gandi.net
This commit is contained in:
Baptiste Daroussin 2016-08-23 13:53:38 +00:00
parent bf6911cd08
commit add3a4c20d
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ SRCS+= time_event.c
.endif
.if defined(LOADER_TFTP_SUPPORT)
CFLAGS+= -DLOADER_TFTP_SUPPORT
CFLAGS+= -DLOADER_TFTP_SUPPORT -DNETIF_OPEN_CLOSE_ONCE
.endif
# We implement a slightly non-standard %S in that it always takes a

View File

@ -22,7 +22,7 @@ SRCS= autoload.c \
vers.c
.if defined(LOADER_TFTP_SUPPORT)
CFLAGS+= -DLOADER_TFTP_SUPPORT
CFLAGS+= -DLOADER_TFTP_SUPPORT -DNETIF_OPEN_CLOSE_ONCE
.endif
.if ${MK_ZFS} != "no"