OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |