gpt: Fixed boot loader build.
* Thanks, Alex!
This commit is contained in:
parent
e9cdc3129e
commit
5257160668
@ -250,6 +250,16 @@ Header::_Write(int fd, off_t offset, const void* data, size_t size) const
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Header::_UpdateCRC()
|
||||
{
|
||||
fHeader.SetEntriesCRC(crc32(fEntries, _EntryArraySize()));
|
||||
fHeader.SetHeaderCRC(0);
|
||||
fHeader.SetHeaderCRC(crc32((uint8*)&fHeader, sizeof(efi_table_header)));
|
||||
}
|
||||
#endif // !_BOOT_MODE
|
||||
|
||||
|
||||
status_t
|
||||
Header::_Read(int fd, off_t offset, void* data, size_t size) const
|
||||
{
|
||||
@ -263,16 +273,6 @@ Header::_Read(int fd, off_t offset, void* data, size_t size) const
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Header::_UpdateCRC()
|
||||
{
|
||||
fHeader.SetEntriesCRC(crc32(fEntries, _EntryArraySize()));
|
||||
fHeader.SetHeaderCRC(0);
|
||||
fHeader.SetHeaderCRC(crc32((uint8*)&fHeader, sizeof(efi_table_header)));
|
||||
}
|
||||
#endif // !_BOOT_MODE
|
||||
|
||||
|
||||
bool
|
||||
Header::_IsHeaderValid(const efi_table_header& header, uint64 block)
|
||||
{
|
||||
|
@ -47,11 +47,11 @@ private:
|
||||
status_t _WriteHeader(int fd);
|
||||
status_t _Write(int fd, off_t offset, const void* data,
|
||||
size_t size) const;
|
||||
status_t _Read(int fd, off_t offset, void* data,
|
||||
size_t size) const;
|
||||
void _UpdateCRC();
|
||||
#endif
|
||||
|
||||
status_t _Read(int fd, off_t offset, void* data,
|
||||
size_t size) const;
|
||||
bool _IsHeaderValid(const efi_table_header& header,
|
||||
uint64 block);
|
||||
bool _ValidateHeaderCRC();
|
||||
|
Loading…
x
Reference in New Issue
Block a user