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

Side by Side Diff: firmware/lib/cgptlib/cgptlib.c

Issue 5352005: Add 'prioritize' command to cgpt tool. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: Created 10 years 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 | Annotate | Revision Log
« no previous file with comments | « cgpt/cmd_show.c ('k') | firmware/lib/cgptlib/include/gpt.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "cgptlib.h" 6 #include "cgptlib.h"
7 #include "cgptlib_internal.h" 7 #include "cgptlib_internal.h"
8 #include "crc32.h" 8 #include "crc32.h"
9 #include "gpt.h" 9 #include "gpt.h"
10 #include "utility.h" 10 #include "utility.h"
11 11
12 /* global types to compare against */
13 const Guid guid_unused = GPT_ENT_TYPE_UNUSED;
14 const Guid guid_chromeos_kernel = GPT_ENT_TYPE_CHROMEOS_KERNEL;
15
16
17 int GptInit(GptData *gpt) { 12 int GptInit(GptData *gpt) {
18 int retval; 13 int retval;
19 14
20 gpt->modified = 0; 15 gpt->modified = 0;
21 gpt->current_kernel = CGPT_KERNEL_ENTRY_NOT_FOUND; 16 gpt->current_kernel = CGPT_KERNEL_ENTRY_NOT_FOUND;
22 gpt->current_priority = 999; 17 gpt->current_priority = 999;
23 18
24 retval = GptSanityCheck(gpt); 19 retval = GptSanityCheck(gpt);
25 if (GPT_SUCCESS != retval) { 20 if (GPT_SUCCESS != retval) {
26 VBDEBUG(("GptInit() failed sanity check\n")); 21 VBDEBUG(("GptInit() failed sanity check\n"));
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 149
155 /* Use the repair function to update the other copy of the GPT. 150 /* Use the repair function to update the other copy of the GPT.
156 * This is a tad inefficient, but is much faster than the disk I/O 151 * This is a tad inefficient, but is much faster than the disk I/O
157 * to update the GPT on disk so it doesn't matter. */ 152 * to update the GPT on disk so it doesn't matter. */
158 gpt->valid_headers = MASK_PRIMARY; 153 gpt->valid_headers = MASK_PRIMARY;
159 gpt->valid_entries = MASK_PRIMARY; 154 gpt->valid_entries = MASK_PRIMARY;
160 GptRepair(gpt); 155 GptRepair(gpt);
161 156
162 return GPT_SUCCESS; 157 return GPT_SUCCESS;
163 } 158 }
OLDNEW
« no previous file with comments | « cgpt/cmd_show.c ('k') | firmware/lib/cgptlib/include/gpt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698