Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151279203
D56115.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D56115.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D56115: stand/efi: retrieving and printing the boot count
Attached
Detach File
Event Timeline
Log In to Comment