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

Unified Diff: src/platform/vboot_reference/utility/cgpt/cgpt_attribute.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, 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 side-by-side diff with in-line comments
Download patch
Index: src/platform/vboot_reference/utility/cgpt/cgpt_attribute.c
diff --git a/src/platform/vboot_reference/utility/cgpt/cgpt_attribute.c b/src/platform/vboot_reference/utility/cgpt/cgpt_attribute.c
index a54d7bab52a15929e28051145a246237b6127cc9..70c89931ee7f0deb27f14d7df514f18a8f2e4629 100644
--- a/src/platform/vboot_reference/utility/cgpt/cgpt_attribute.c
+++ b/src/platform/vboot_reference/utility/cgpt/cgpt_attribute.c
@@ -9,6 +9,7 @@
#include <stdlib.h>
#include "cgpt.h"
#include "cgptlib_internal.h"
+#include "cgpt_tofix.h"
#include "utility.h"
static struct number_range
@@ -126,8 +127,6 @@ int CgptAttribute(int argc, char *argv[]) {
}
}
- if (bad != NOT_INITED)
- SetBad(&drive.gpt, PRIMARY, partition, bad);
if (successful != NOT_INITED)
SetSuccessful(&drive.gpt, PRIMARY, partition, successful);
if (tries != NOT_INITED)
@@ -136,8 +135,11 @@ int CgptAttribute(int argc, char *argv[]) {
SetPriority(&drive.gpt, PRIMARY, partition, priority);
/* Claims primary is good, then secondary will be overwritten. */
+ /* TODO: rspangler broke this during cgptlib refactoring; need to
+ * update this to match new internal APIs. */
RepairEntries(&drive.gpt, MASK_PRIMARY);
RepairHeader(&drive.gpt, MASK_PRIMARY);
+
/* Forces headers and entries are modified so that CRC32 will be re-calculated
* and headers and entries will be updated to drive. */
drive.gpt.modified |= (GPT_MODIFIED_HEADER1 | GPT_MODIFIED_ENTRIES1 |

Powered by Google App Engine
This is Rietveld 408576698