Page MenuHomeFreeBSD

D56115.diff
No OneTemporary

D56115.diff

diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c
--- a/stand/efi/loader/bootinfo.c
+++ b/stand/efi/loader/bootinfo.c
@@ -172,19 +172,18 @@
efi_get_mono_count(void)
{
UINT64 mono_count;
- uint32_t high_bits_mono_count;
uint32_t low_bits_mono_count;
+ uint32_t high_bits_mono_count;
+ EFI_STATUS mc_status;
- EFI_STATUS mc_status;
-
- // Gets the boot count, only high 32 bits contain it.
+ /* Gets the boot count, only high 32 bits contain it. */
mc_status = BS->GetNextMonotonicCount(&mono_count);
- if (mc_status == EFI_DEVICE_ERROR)
- printf("GetNextHighMonotonicCount error %lu\n", EFI_ERROR_CODE(mc_status));
- else if (mc_status == EFI_INVALID_PARAMETER)
- printf("GetNextHighMonotonicCount error %lu\n", EFI_ERROR_CODE(mc_status));
+ if (EFI_ERROR(mc_status)) {
+ printf("GetNextMonotonicCount error %lu\n", EFI_ERROR_CODE(mc_status));
+ return 0;
+ }
- // Need to preserve low 32 bits too, for wraparound detection
+ /* Need to preserve low 32 bits too, for wraparound detection */
high_bits_mono_count = (uint32_t)(mono_count >> 32);
low_bits_mono_count = (uint32_t)(mono_count << 32);
printf("monocount high 32 = %u \n", high_bits_mono_count);

File Metadata

Mime Type
text/plain
Expires
Wed, Apr 8, 7:14 AM (9 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30591270
Default Alt Text
D56115.diff (1 KB)

Event Timeline