diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-10-24 00:40:09 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-10-24 00:40:09 +0200 |
commit | fa3e71ab808441aaf5d8cb2318f536089dafea3f (patch) | |
tree | f1e1eb7a509a8f5b6712cbf977c7e785b0927e8c /sys/src/boot/efi/fs.c | |
parent | 3bb7ad61aa05fca94fe508914ad5bbf4cf3a86f6 (diff) |
efi: change eficonfig ordering so memconf() is first, dont fallback to fs when /cfg/pxe/ file isnt there
having the memconf() (*e820=) last clutters the screen.
do it first, so we can read *acpi= and *bootscreen=
prints.
we want to continue using tftp even when the /cfg/pxe/$ether
file is not found. only when we detect no pxe/dhcp session,
then we switch to local filesystem (non-network boot).
Diffstat (limited to 'sys/src/boot/efi/fs.c')
-rw-r--r-- | sys/src/boot/efi/fs.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/src/boot/efi/fs.c b/sys/src/boot/efi/fs.c index 04d9114a0..7850a5e81 100644 --- a/sys/src/boot/efi/fs.c +++ b/sys/src/boot/efi/fs.c @@ -83,8 +83,8 @@ fsclose(void *f) eficall(((EFI_FILE_PROTOCOL*)f)->Close, f); } -void* -fsinit(void) +int +fsinit(void **pf) { EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *fs; @@ -92,15 +92,18 @@ fsinit(void) fsroot = nil; if(eficall(ST->BootServices->LocateProtocol, &EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID, nil, &fs)) - return nil; + return -1; if(eficall(fs->OpenVolume, fs, &fsroot)){ fsroot = nil; - return nil; + return -1; } read = fsread; close = fsclose; open = fsopen; - return fsopen("/plan9.ini"); + if(pf != nil) + *pf = fsopen("/plan9.ini"); + + return 0; } |