diff options
| author | Michael Brown | 2015-08-21 16:41:35 +0200 |
|---|---|---|
| committer | Michael Brown | 2015-08-21 16:46:28 +0200 |
| commit | f58ebbdfb5f48089bb3df088654d5bf735dab2c2 (patch) | |
| tree | f8b476c798df160482773c9d6ac68eb8f02c88e4 /src/interface/efi | |
| parent | [pxe] Warn about PXE NBPs that may be EFI executables (diff) | |
| download | ipxe-f58ebbdfb5f48089bb3df088654d5bf735dab2c2.tar.gz ipxe-f58ebbdfb5f48089bb3df088654d5bf735dab2c2.tar.xz ipxe-f58ebbdfb5f48089bb3df088654d5bf735dab2c2.zip | |
[test] Allow self-tests to report exit status when running under Linux
Allow the return status from an embedded image to propagate out to the
eventual return status from main(). When running under Linux, this
allows the pass/fail result of unit tests to be observable without
having to visually inspect the console output.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/interface/efi')
| -rw-r--r-- | src/interface/efi/efi_snp.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/interface/efi/efi_snp.c b/src/interface/efi/efi_snp.c index 1b21c40c4..3dfcc5e16 100644 --- a/src/interface/efi/efi_snp.c +++ b/src/interface/efi/efi_snp.c @@ -871,6 +871,7 @@ efi_snp_load_file ( EFI_LOAD_FILE_PROTOCOL *load_file, struct efi_snp_device *snpdev = container_of ( load_file, struct efi_snp_device, load_file ); struct net_device *netdev = snpdev->netdev; + int rc; /* Fail unless this is a boot attempt */ if ( ! booting ) { @@ -886,16 +887,13 @@ efi_snp_load_file ( EFI_LOAD_FILE_PROTOCOL *load_file, efi_watchdog_start(); /* Boot from network device */ - ipxe ( netdev ); + if ( ( rc = ipxe ( netdev ) ) != 0 ) + goto err_ipxe; - /* Stop watchdog holdoff timer */ + err_ipxe: efi_watchdog_stop(); - - /* Release network devices for use via SNP */ efi_snp_release(); - - /* Assume boot process was aborted */ - return EFI_ABORTED; + return EFIRC ( rc ); } /** Load file protocol */ |
