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

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

Issue 2231002: complete 'cgpt show' and refactor for incoming commands. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: Created 10 years, 7 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 * Repair headers and tables. 5 * Repair headers and tables.
6 * 6 *
7 * If primary header or table is invalid, it copies from secondary (vice versa). 7 * If primary header or table is invalid, it copies from secondary (vice versa).
8 */ 8 */
9 #include <getopt.h> 9 #include <getopt.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 repair_options_details)) 59 repair_options_details))
60 return CGPT_FAILED; 60 return CGPT_FAILED;
61 if (help != NOT_INITED) { 61 if (help != NOT_INITED) {
62 RepairHelp(); 62 RepairHelp();
63 return CGPT_FAILED; 63 return CGPT_FAILED;
64 } 64 }
65 65
66 if (CGPT_OK != OpenDriveInLastArgument(argc, argv, &drive)) 66 if (CGPT_OK != OpenDriveInLastArgument(argc, argv, &drive))
67 return CGPT_FAILED; 67 return CGPT_FAILED;
68 68
69 GptRepair(&drive.gpt);
70 if (drive.gpt.modified & GPT_MODIFIED_HEADER1)
71 printf("* Pri Header is updated.\n");
72 if (drive.gpt.modified & GPT_MODIFIED_ENTRIES1)
73 printf("* Pri Table Entries is updated.\n");
74 if (drive.gpt.modified & GPT_MODIFIED_ENTRIES2)
75 printf("* Sec Table Entries is updated.\n");
76 if (drive.gpt.modified & GPT_MODIFIED_HEADER2)
77 printf("* Sec Header is updated.\n");
78
69 DriveClose(&drive); 79 DriveClose(&drive);
70 80
71 return CGPT_OK; 81 return CGPT_OK;
72 } 82 }
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/utility/cgpt/cgpt_attribute.c ('k') | src/platform/vboot_reference/utility/cgpt/cgpt_show.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698