Permalink
Browse files

gpt: Fixed boot loader build.

* Thanks, Alex!
  • Loading branch information...
1 parent e9cdc31 commit 5257160668005086169d9431a56baf55f40dc54e @axeld axeld committed Jan 27, 2013
@@ -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 @@ class Header {
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();

0 comments on commit 5257160

Please sign in to comment.