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

Unified Diff: src/platform/vboot_reference/utility/cgpt/cgpt_tofix.h

Issue 2438005: Much rearranging of cgptlib. Passes all its (new) unit tests. (Closed) Base URL: ssh://gitrw.chromium.org/chromiumos
Patch Set: Pre commit Created 10 years, 7 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
Index: src/platform/vboot_reference/utility/cgpt/cgpt_tofix.h
diff --git a/src/platform/vboot_reference/utility/cgpt/cgpt_tofix.h b/src/platform/vboot_reference/utility/cgpt/cgpt_tofix.h
new file mode 100644
index 0000000000000000000000000000000000000000..8e645df4eb86e47421768f859c3f8777838f038d
--- /dev/null
+++ b/src/platform/vboot_reference/utility/cgpt/cgpt_tofix.h
@@ -0,0 +1,40 @@
+/* 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 CGPT_TOFIX_H_
+#define CGPT_TOFIX_H_
+
+#include <stdint.h>
+#include "cgptlib.h"
+#include "cgptlib_internal.h"
+#include "gpt.h"
+
+/* TODO: This is stuff copied out of cgptlib. cgptlib doesn't need it anymore,but currently the cgpt tool does. */
+
+const char *GptError(int errno);
+
+int IsSynonymous(const GptHeader* a, const GptHeader* b);
+uint8_t RepairEntries(GptData *gpt, const uint32_t valid_entries);
+uint8_t RepairHeader(GptData *gpt, const uint32_t valid_headers);
+void UpdateCrc(GptData *gpt);
+int NonZeroGuid(const Guid *guid);
+uint32_t CheckValidEntries(GptData *gpt);
+uint32_t CheckOverlappedPartition(GptData *gpt);
+
+GptEntry *GetEntry(GptData *gpt, int secondary, int entry_index);
+void SetPriority(GptData *gpt, int secondary, int entry_index, int priority);
+int GetPriority(GptData *gpt, int secondary, int entry_index);
+void SetBad(GptData *gpt, int secondary, int entry_index, int bad);
+int GetBad(GptData *gpt, int secondary, int entry_index);
+void SetTries(GptData *gpt, int secondary, int entry_index, int tries);
+int GetTries(GptData *gpt, int secondary, int entry_index);
+void SetSuccessful(GptData *gpt, int secondary, int entry_index, int success);
+int GetSuccessful(GptData *gpt, int secondary, int entry_index);
+
+/* Get number of entries value in primary header */
+uint32_t GetNumberOfEntries(const GptData *gpt);
+
+
+#endif /* CGPT_TOFIX_H_ */
« no previous file with comments | « src/platform/vboot_reference/utility/cgpt/cgpt_show.c ('k') | src/platform/vboot_reference/utility/cgpt/cgpt_tofix.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698