diff options
author | Simon Rettberg | 2024-04-12 14:52:06 +0200 |
---|---|---|
committer | Simon Rettberg | 2024-04-12 14:52:06 +0200 |
commit | 2ae76865d3d109712f9ee488cbc19bd107bbc9ab (patch) | |
tree | 36e7310eb089cf7fd3496e5c32c70981e447f235 /src/interface/efi/efiprefix.c | |
parent | Merge branch 'aqc1xx' into openslx (diff) | |
parent | [netdevice] Add "linktype" setting (diff) | |
download | ipxe-2ae76865d3d109712f9ee488cbc19bd107bbc9ab.tar.gz ipxe-2ae76865d3d109712f9ee488cbc19bd107bbc9ab.tar.xz ipxe-2ae76865d3d109712f9ee488cbc19bd107bbc9ab.zip |
Merge branch 'master' into openslxopenslx
Diffstat (limited to 'src/interface/efi/efiprefix.c')
-rw-r--r-- | src/interface/efi/efiprefix.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/interface/efi/efiprefix.c b/src/interface/efi/efiprefix.c index 26116068..10d8f0bf 100644 --- a/src/interface/efi/efiprefix.c +++ b/src/interface/efi/efiprefix.c @@ -22,6 +22,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <stdlib.h> #include <errno.h> #include <ipxe/device.h> +#include <ipxe/uri.h> #include <ipxe/init.h> #include <ipxe/efi/efi.h> #include <ipxe/efi/efi_driver.h> @@ -30,6 +31,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <ipxe/efi/efi_autoexec.h> #include <ipxe/efi/efi_cachedhcp.h> #include <ipxe/efi/efi_watchdog.h> +#include <ipxe/efi/efi_path.h> #include <ipxe/efi/efi_veto.h> /** @@ -79,16 +81,19 @@ EFI_STATUS EFIAPI _efi_start ( EFI_HANDLE image_handle, static void efi_init_application ( void ) { EFI_HANDLE device = efi_loaded_image->DeviceHandle; EFI_DEVICE_PATH_PROTOCOL *devpath = efi_loaded_image_path; - EFI_DEVICE_PATH_PROTOCOL *filepath = efi_loaded_image->FilePath; + struct uri *uri; + + /* Set current working URI from device path, if present */ + uri = efi_path_uri ( devpath ); + if ( uri ) + churi ( uri ); + uri_put ( uri ); /* Identify autoboot device, if any */ efi_set_autoboot_ll_addr ( device, devpath ); /* Store cached DHCP packet, if any */ efi_cachedhcp_record ( device, devpath ); - - /* Load autoexec script, if any */ - efi_autoexec_load ( device, filepath ); } /** EFI application initialisation function */ @@ -103,6 +108,9 @@ struct init_fn efi_init_application_fn __init_fn ( INIT_NORMAL ) = { */ static int efi_probe ( struct root_device *rootdev __unused ) { + /* Try loading autoexec script */ + efi_autoexec_load(); + /* Remove any vetoed drivers */ efi_veto(); |