Change debug messages to use 1-based GPT partition numbers.

BUG=none
TEST=none

Change-Id: Ib717f1008edbb6c11d73fbe42d533ebe45800a45
Reviewed-on: http://gerrit.chromium.org/gerrit/7410
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
Bill Richardson
2011-09-08 10:19:12 -07:00
parent 209166af0d
commit 3235751eac
2 changed files with 6 additions and 3 deletions

View File

@@ -44,7 +44,7 @@ int GptNextKernelEntry(GptData* gpt, uint64_t* start_sector, uint64_t* size) {
e = entries + i; e = entries + i;
if (!IsKernelEntry(e)) if (!IsKernelEntry(e))
continue; continue;
VBDEBUG(("GptNextKernelEntry looking at same prio partition %d\n", i)); VBDEBUG(("GptNextKernelEntry looking at same prio partition %d\n", i+1));
VBDEBUG(("GptNextKernelEntry s%d t%d p%d\n", VBDEBUG(("GptNextKernelEntry s%d t%d p%d\n",
GetEntrySuccessful(e), GetEntryTries(e), GetEntryPriority(e))); GetEntrySuccessful(e), GetEntryTries(e), GetEntryPriority(e)));
if (!(GetEntrySuccessful(e) || GetEntryTries(e))) if (!(GetEntrySuccessful(e) || GetEntryTries(e)))
@@ -65,7 +65,7 @@ int GptNextKernelEntry(GptData* gpt, uint64_t* start_sector, uint64_t* size) {
int current_prio = GetEntryPriority(e); int current_prio = GetEntryPriority(e);
if (!IsKernelEntry(e)) if (!IsKernelEntry(e))
continue; continue;
VBDEBUG(("GptNextKernelEntry looking at new prio partition %d\n", i)); VBDEBUG(("GptNextKernelEntry looking at new prio partition %d\n", i+1));
VBDEBUG(("GptNextKernelEntry s%d t%d p%d\n", VBDEBUG(("GptNextKernelEntry s%d t%d p%d\n",
GetEntrySuccessful(e), GetEntryTries(e), GetEntryPriority(e))); GetEntrySuccessful(e), GetEntryTries(e), GetEntryPriority(e)));
if (!(GetEntrySuccessful(e) || GetEntryTries(e))) if (!(GetEntrySuccessful(e) || GetEntryTries(e)))

View File

@@ -61,7 +61,10 @@ typedef struct {
* 0x04 = table1 * 0x04 = table1
* 0x08 = table2 */ * 0x08 = table2 */
int current_kernel; /* the current chromeos kernel index in partition table. int current_kernel; /* the current chromeos kernel index in partition table.
* -1 means not found on drive. */ * -1 means not found on drive. Note that GPT partition
* numbers are traditionally 1-based, but we're using
* a zero-based index here.
*/
/* Internal variables */ /* Internal variables */
uint32_t valid_headers, valid_entries; uint32_t valid_headers, valid_entries;