summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2011-09-08 10:19:12 -0700
committerBill Richardson <wfrichar@chromium.org>2011-09-08 10:27:53 -0700
commit3235751eac78f5c47ccb4cb05aafe745b96493f4 (patch)
treec66b27243d3d1db3693cb873eb53aa1c198958a7
parent209166af0d6e8e21f6c462ea19fbcfc6c933ea78 (diff)
downloadvboot-3235751eac78f5c47ccb4cb05aafe745b96493f4.tar.gz
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>
-rw-r--r--firmware/lib/cgptlib/cgptlib.c4
-rw-r--r--firmware/lib/cgptlib/include/cgptlib.h5
2 files changed, 6 insertions, 3 deletions
diff --git a/firmware/lib/cgptlib/cgptlib.c b/firmware/lib/cgptlib/cgptlib.c
index 2dcb46df..e708b7bc 100644
--- a/firmware/lib/cgptlib/cgptlib.c
+++ b/firmware/lib/cgptlib/cgptlib.c
@@ -44,7 +44,7 @@ int GptNextKernelEntry(GptData* gpt, uint64_t* start_sector, uint64_t* size) {
e = entries + i;
if (!IsKernelEntry(e))
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",
GetEntrySuccessful(e), GetEntryTries(e), GetEntryPriority(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);
if (!IsKernelEntry(e))
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",
GetEntrySuccessful(e), GetEntryTries(e), GetEntryPriority(e)));
if (!(GetEntrySuccessful(e) || GetEntryTries(e)))
diff --git a/firmware/lib/cgptlib/include/cgptlib.h b/firmware/lib/cgptlib/include/cgptlib.h
index 4eadc817..451ecf0b 100644
--- a/firmware/lib/cgptlib/include/cgptlib.h
+++ b/firmware/lib/cgptlib/include/cgptlib.h
@@ -61,7 +61,10 @@ typedef struct {
* 0x04 = table1
* 0x08 = table2 */
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 */
uint32_t valid_headers, valid_entries;