diff options
author | Jan Janssen <medhefgo@web.de> | 2022-06-23 14:48:13 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-06-23 18:41:35 +0200 |
commit | c4ba5fef7836eb33efeb95208c0b3692a82e6004 (patch) | |
tree | 630f341aee824e685b910b0effc871dc18dca916 /src/boot | |
parent | logind: simplify code (diff) | |
download | systemd-c4ba5fef7836eb33efeb95208c0b3692a82e6004.tar.xz systemd-c4ba5fef7836eb33efeb95208c0b3692a82e6004.zip |
boot: Fix calls to ResetSystem
gnu-efi falsely declares a return type for ResetSystem when it should be
void. The spec also says that it never returns, so just assert.
Diffstat (limited to 'src/boot')
-rw-r--r-- | src/boot/efi/boot.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/boot/efi/boot.c b/src/boot/efi/boot.c index ea80c1875d..0d472b0386 100644 --- a/src/boot/efi/boot.c +++ b/src/boot/efi/boot.c @@ -593,8 +593,8 @@ static EFI_STATUS reboot_into_firmware(void) { if (EFI_ERROR(err)) return log_error_status_stall(err, L"Error setting OsIndications: %r", err); - err = RT->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL); - return log_error_status_stall(err, L"Error calling ResetSystem: %r", err); + RT->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL); + assert_not_reached(); } static BOOLEAN menu_run( @@ -1986,7 +1986,8 @@ static EFI_STATUS boot_windows_bitlocker(void) { EFI_VARIABLE_NON_VOLATILE); if (EFI_ERROR(err)) return err; - return RT->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL); + RT->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL); + assert_not_reached(); } } |