diff options
author | Bill Richardson <wfrichar@chromium.org> | 2010-11-29 14:24:51 -0800 |
---|---|---|
committer | Bill Richardson <wfrichar@chromium.org> | 2010-11-29 14:24:51 -0800 |
commit | 3430b32667937a75c7a3afc83f8f7a601a8187f7 (patch) | |
tree | af0492bff6b8493080d0ae959baa015434c3e3a7 /cgpt/cmd_show.c | |
parent | 5f500b19ba0cdc174a47a68e40f939a4ed69861c (diff) | |
download | vboot-3430b32667937a75c7a3afc83f8f7a601a8187f7.tar.gz |
Add 'prioritize' command to cgpt tool.
This lets us reorder the priority of all the kernel partitions with a single
command, instead of a bunch of complicated and error-prone shell script
logic.
Change-Id: I21d39763ec5a748488d5319a987bcfe7c34ce4d0
BUG=chromium-os:9167
TEST=manual
In the chroot, do this:
cd ~/trunk/src/platform/vboot_reference
make
make runtests
make clean
Everything should pass.
Review URL: http://codereview.chromium.org/5352005
Diffstat (limited to 'cgpt/cmd_show.c')
-rw-r--r-- | cgpt/cmd_show.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cgpt/cmd_show.c b/cgpt/cmd_show.c index 920a30fe..4942251f 100644 --- a/cgpt/cmd_show.c +++ b/cgpt/cmd_show.c @@ -133,7 +133,7 @@ void EntryDetails(GptEntry *entry, uint32_t index, int raw) { } GuidToStr(&entry->unique, unique, GUID_STRLEN); printf(PARTITION_MORE, "UUID: ", unique); - if (!memcmp(&guid_chromeos_kernel, &entry->type, sizeof(Guid))) { + if (GuidEqual(&guid_chromeos_kernel, &entry->type)) { int tries = (entry->attrs.fields.gpt_att & CGPT_ATTRIBUTE_TRIES_MASK) >> CGPT_ATTRIBUTE_TRIES_OFFSET; @@ -176,7 +176,8 @@ void EntriesDetails(GptData *gpt, const int secondary, int raw) { GptEntry *entry; entry = GetEntry(gpt, secondary, i); - if (!memcmp(&guid_unused, &entry->type, sizeof(Guid))) continue; + if (IsZero(&entry->type)) + continue; EntryDetails(entry, i, raw); } |