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

Side by Side Diff: src/platform/vboot_reference/utility/cgpt/cgpt_add_modify_delete.c

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, 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 * Update GPT attribute bits. 5 * Update GPT attribute bits.
6 */ 6 */
7 #include <getopt.h> 7 #include <getopt.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include "cgpt.h" 10 #include "cgpt.h"
11 #include "cgptlib_internal.h" 11 #include "cgptlib_internal.h"
12 #include "cgpt_tofix.h"
12 #include "utility.h" 13 #include "utility.h"
13 14
14 static struct number_range 15 static struct number_range
15 range_127_0 = {127, 0}; 16 range_127_0 = {127, 0};
16 17
17 /* Integers to store parsed argument. */ 18 /* Integers to store parsed argument. */
18 static int help, partition, begin_lba, size_lba; 19 static int help, partition, begin_lba, size_lba;
19 static char type[128], unique[128], name[128]; 20 static char type[128], unique[128], name[128];
20 21
21 /* The structure for getopt_long(). When you add/delete any line, please refine 22 /* The structure for getopt_long(). When you add/delete any line, please refine
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 GPT_MODIFIED_HEADER2 | GPT_MODIFIED_ENTRIES2); 268 GPT_MODIFIED_HEADER2 | GPT_MODIFIED_ENTRIES2);
268 UpdateCrc(&drive.gpt); 269 UpdateCrc(&drive.gpt);
269 } 270 }
270 DriveClose(&drive); 271 DriveClose(&drive);
271 return CGPT_OK; 272 return CGPT_OK;
272 273
273 error_close: 274 error_close:
274 DriveClose(&drive); 275 DriveClose(&drive);
275 return CGPT_FAILED; 276 return CGPT_FAILED;
276 } 277 }
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/utility/cgpt/cgpt.c ('k') | src/platform/vboot_reference/utility/cgpt/cgpt_attribute.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698