gpt: Fixed boot loader build.
* Thanks, Alex!
This commit is contained in:
@@ -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
|
status_t
|
||||||
Header::_Read(int fd, off_t offset, void* data, size_t size) const
|
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
|
bool
|
||||||
Header::_IsHeaderValid(const efi_table_header& header, uint64 block)
|
Header::_IsHeaderValid(const efi_table_header& header, uint64 block)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,11 +47,11 @@ private:
|
|||||||
status_t _WriteHeader(int fd);
|
status_t _WriteHeader(int fd);
|
||||||
status_t _Write(int fd, off_t offset, const void* data,
|
status_t _Write(int fd, off_t offset, const void* data,
|
||||||
size_t size) const;
|
size_t size) const;
|
||||||
status_t _Read(int fd, off_t offset, void* data,
|
|
||||||
size_t size) const;
|
|
||||||
void _UpdateCRC();
|
void _UpdateCRC();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
status_t _Read(int fd, off_t offset, void* data,
|
||||||
|
size_t size) const;
|
||||||
bool _IsHeaderValid(const efi_table_header& header,
|
bool _IsHeaderValid(const efi_table_header& header,
|
||||||
uint64 block);
|
uint64 block);
|
||||||
bool _ValidateHeaderCRC();
|
bool _ValidateHeaderCRC();
|
||||||
|
|||||||
Reference in New Issue
Block a user