diff options
Diffstat (limited to 'firmware/lib/cgptlib/include')
-rw-r--r-- | firmware/lib/cgptlib/include/cgptlib.h | 4 | ||||
-rw-r--r-- | firmware/lib/cgptlib/include/cgptlib_internal.h | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/firmware/lib/cgptlib/include/cgptlib.h b/firmware/lib/cgptlib/include/cgptlib.h index b6b27c96..6633733e 100644 --- a/firmware/lib/cgptlib/include/cgptlib.h +++ b/firmware/lib/cgptlib/include/cgptlib.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. +/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -21,6 +21,8 @@ enum { GPT_ERROR_START_LBA_OVERLAP, GPT_ERROR_END_LBA_OVERLAP, GPT_ERROR_DUP_GUID, + /* Number of errors */ + GPT_ERROR_COUNT }; /* Bit masks for GptData.modified field. */ diff --git a/firmware/lib/cgptlib/include/cgptlib_internal.h b/firmware/lib/cgptlib/include/cgptlib_internal.h index f899eab0..36e598c2 100644 --- a/firmware/lib/cgptlib/include/cgptlib_internal.h +++ b/firmware/lib/cgptlib/include/cgptlib_internal.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2011 The Chromium OS Authors. All rights reserved. +/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -89,6 +89,15 @@ uint32_t HeaderCrc(GptHeader* h); * Returns 0 if entries are valid, 1 if invalid. */ int CheckEntries(GptEntry* entries, GptHeader* h); +/* Return 0 if the GptHeaders are the same for all fields which don't + * differ between the primary and secondary headers - that is, all + * fields other than: + * + * my_lba + * alternate_lba + * entries_lba */ +int HeaderFieldsSame(GptHeader *h1, GptHeader *h2); + /* Check GptData, headers, entries. * * If successful, sets gpt->valid_headers and gpt->valid_entries and returns |