Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1884)

Unified Diff: src/platform/vboot_reference/cgptlib/cgpt_internal.h

Issue 1701017: Add more test cases for GptInit() and fixed some bugs (Closed)
Patch Set: refine for code review Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/vboot_reference/cgptlib/cgpt.c ('k') | src/platform/vboot_reference/cgptlib/crc32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/vboot_reference/cgptlib/cgpt_internal.h
diff --git a/src/platform/vboot_reference/cgptlib/cgpt_internal.h b/src/platform/vboot_reference/cgptlib/cgpt_internal.h
new file mode 100644
index 0000000000000000000000000000000000000000..0f56d44b3e96d73379163742e3b80495904d287a
--- /dev/null
+++ b/src/platform/vboot_reference/cgptlib/cgpt_internal.h
@@ -0,0 +1,36 @@
+/* Copyright (c) 2010 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.
+ */
+
+#ifndef VBOOT_REFERENCE_CGPT_INTERNAL_H_
+#define VBOOT_REFERENCE_CGPT_INTERNAL_H_
+
+#include <stdint.h>
+#include "cgpt.h"
+
+/* Internal use only.
+ * Don't use them unless you know what you are doing. */
+int CheckParameters(GptData *gpt);
+uint32_t CheckHeaderSignature(GptData *gpt);
+uint32_t CheckRevision(GptData *gpt);
+uint32_t CheckSize(GptData *gpt);
+uint32_t CheckReservedFields(GptData *gpt);
+uint32_t CheckMyLba(GptData *gpt);
+uint32_t CheckSizeOfPartitionEntry(GptData *gpt);
+uint32_t CheckNumberOfEntries(GptData *gpt);
+uint32_t CheckEntriesLba(GptData *gpt);
+uint32_t CheckValidUsableLbas(GptData *gpt);
+uint32_t CheckHeaderCrc(GptData *gpt);
+uint32_t CheckEntriesCrc(GptData *gpt);
+uint32_t CheckValidEntries(GptData *gpt);
+int OverlappedEntries(GptEntry *entries, uint32_t number_of_entries);
+uint32_t CheckOverlappedPartition(GptData *gpt);
+uint8_t RepairEntries(GptData *gpt, const uint32_t valid_entries);
+uint8_t RepairHeader(GptData *gpt, const uint32_t valid_headers);
+typedef struct {
+ uint64_t starting;
+ uint64_t ending;
+} pair_t;
+
+#endif /* VBOOT_REFERENCE_CGPT_INTERNAL_H_ */
« no previous file with comments | « src/platform/vboot_reference/cgptlib/cgpt.c ('k') | src/platform/vboot_reference/cgptlib/crc32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698