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 * Show GPT details. | 5 * Show GPT details. |
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 /* Integers to store parsed argument. */ | 15 /* Integers to store parsed argument. */ |
15 static int help, number, verbose; | 16 static int help, number, verbose; |
16 | 17 |
17 /* The structure for getopt_long(). When you add/delete any line, please refine | 18 /* The structure for getopt_long(). When you add/delete any line, please refine |
18 * attribute_comments[] and third parameter of getopt_long() too. */ | 19 * attribute_comments[] and third parameter of getopt_long() too. */ |
19 static struct option show_options[] = { | 20 static struct option show_options[] = { |
20 {.name = "help", .has_arg = no_argument, .flag = 0, .val = 'h'}, | 21 {.name = "help", .has_arg = no_argument, .flag = 0, .val = 'h'}, |
21 {.name = "number", .has_arg = no_argument, .flag = 0, .val = 'n'}, | 22 {.name = "number", .has_arg = no_argument, .flag = 0, .val = 'n'}, |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 header = (GptHeader*)drive.gpt.secondary_header; | 283 header = (GptHeader*)drive.gpt.secondary_header; |
283 HeaderDetails(header, indent); | 284 HeaderDetails(header, indent); |
284 } | 285 } |
285 } | 286 } |
286 | 287 |
287 CheckValid(&drive); | 288 CheckValid(&drive); |
288 DriveClose(&drive); | 289 DriveClose(&drive); |
289 | 290 |
290 return CGPT_OK; | 291 return CGPT_OK; |
291 } | 292 } |
OLD | NEW |