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

Side by Side Diff: src/platform/vboot_reference/cgptlib/cgptlib_internal.h

Issue 2374001: cgpt supports dev and add/delete/modify commands. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: Created 10 years, 6 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 unified diff | Download patch
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 */ 4 */
5 5
6 #ifndef VBOOT_REFERENCE_CGPTLIB_INTERNAL_H_ 6 #ifndef VBOOT_REFERENCE_CGPTLIB_INTERNAL_H_
7 #define VBOOT_REFERENCE_CGPTLIB_INTERNAL_H_ 7 #define VBOOT_REFERENCE_CGPTLIB_INTERNAL_H_
8 8
9 #include <stdint.h> 9 #include <stdint.h>
10 #include "cgptlib.h" 10 #include "cgptlib.h"
11 11
12 int CheckParameters(GptData *gpt); 12 int CheckParameters(GptData *gpt);
13 uint32_t CheckHeaderSignature(GptData *gpt); 13 uint32_t CheckHeaderSignature(GptData *gpt);
14 uint32_t CheckRevision(GptData *gpt); 14 uint32_t CheckRevision(GptData *gpt);
15 uint32_t CheckSize(GptData *gpt); 15 uint32_t CheckSize(GptData *gpt);
16 uint32_t CheckReservedFields(GptData *gpt); 16 uint32_t CheckReservedFields(GptData *gpt);
17 uint32_t CheckMyLba(GptData *gpt); 17 uint32_t CheckMyLba(GptData *gpt);
18 uint32_t CheckSizeOfPartitionEntry(GptData *gpt); 18 uint32_t CheckSizeOfPartitionEntry(GptData *gpt);
19 uint32_t CheckNumberOfEntries(GptData *gpt); 19 uint32_t CheckNumberOfEntries(GptData *gpt);
20 uint32_t CheckEntriesLba(GptData *gpt); 20 uint32_t CheckEntriesLba(GptData *gpt);
21 uint32_t CheckValidUsableLbas(GptData *gpt); 21 uint32_t CheckValidUsableLbas(GptData *gpt);
22 uint32_t CheckHeaderCrc(GptData *gpt); 22 uint32_t CheckHeaderCrc(GptData *gpt);
23 uint32_t CheckEntriesCrc(GptData *gpt); 23 uint32_t CheckEntriesCrc(GptData *gpt);
24 int NonZeroGuid(const Guid *guid);
24 uint32_t CheckValidEntries(GptData *gpt); 25 uint32_t CheckValidEntries(GptData *gpt);
25 typedef struct { 26 typedef struct {
26 uint64_t starting; 27 uint64_t starting;
27 uint64_t ending; 28 uint64_t ending;
28 } pair_t; 29 } pair_t;
29 int OverlappedEntries(GptEntry *entries, uint32_t number_of_entries); 30 int OverlappedEntries(GptEntry *entries, uint32_t number_of_entries);
30 uint32_t CheckOverlappedPartition(GptData *gpt); 31 uint32_t CheckOverlappedPartition(GptData *gpt);
31 int IsSynonymous(const GptHeader* a, const GptHeader* b); 32 int IsSynonymous(const GptHeader* a, const GptHeader* b);
32 uint8_t RepairEntries(GptData *gpt, const uint32_t valid_entries); 33 uint8_t RepairEntries(GptData *gpt, const uint32_t valid_entries);
33 uint8_t RepairHeader(GptData *gpt, const uint32_t valid_headers); 34 uint8_t RepairHeader(GptData *gpt, const uint32_t valid_headers);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 #define CGPT_ATTRIBUTE_MAX_TRIES (15ULL) 81 #define CGPT_ATTRIBUTE_MAX_TRIES (15ULL)
81 #define CGPT_ATTRIBUTE_TRIES_MASK (CGPT_ATTRIBUTE_MAX_TRIES << \ 82 #define CGPT_ATTRIBUTE_TRIES_MASK (CGPT_ATTRIBUTE_MAX_TRIES << \
82 CGPT_ATTRIBUTE_TRIES_OFFSET) 83 CGPT_ATTRIBUTE_TRIES_OFFSET)
83 84
84 #define CGPT_ATTRIBUTE_PRIORITY_OFFSET 48 85 #define CGPT_ATTRIBUTE_PRIORITY_OFFSET 48
85 #define CGPT_ATTRIBUTE_MAX_PRIORITY (15ULL) 86 #define CGPT_ATTRIBUTE_MAX_PRIORITY (15ULL)
86 #define CGPT_ATTRIBUTE_PRIORITY_MASK (CGPT_ATTRIBUTE_MAX_PRIORITY << \ 87 #define CGPT_ATTRIBUTE_PRIORITY_MASK (CGPT_ATTRIBUTE_MAX_PRIORITY << \
87 CGPT_ATTRIBUTE_PRIORITY_OFFSET) 88 CGPT_ATTRIBUTE_PRIORITY_OFFSET)
88 89
89 #endif /* VBOOT_REFERENCE_CGPTLIB_INTERNAL_H_ */ 90 #endif /* VBOOT_REFERENCE_CGPTLIB_INTERNAL_H_ */
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/cgptlib/cgptlib.c ('k') | src/platform/vboot_reference/utility/cgpt/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698