summaryrefslogtreecommitdiff
path: root/firmware/lib/cgptlib
diff options
context:
space:
mode:
authorDan Ehrenberg <dehrenberg@chromium.org>2014-11-21 15:44:05 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-12-12 21:37:58 +0000
commit32a999d2c0e5bf8a1c0f6141d3db77a1dcc6f5af (patch)
tree8861b996d0698c355c021754a005b24e5e947e4e /firmware/lib/cgptlib
parentb3d38f5c620da89662deb1a08971c5025d6c1132 (diff)
downloadvboot-32a999d2c0e5bf8a1c0f6141d3db77a1dcc6f5af.tar.gz
vboot: Move IsEntryUnused to gpt_misc
Over in depthcharge, IsEntryUnused will be useful for presenting the partition table to the kernel. This patch moves that function to gpt_misc.[ch] for export to depthcharge. TEST=Booted a kernel on NAND with all this compiled in TEST=make runtests passed BRANCH=none BUG=none Signed-off-by: Dan Ehrenberg <dehrenberg@google.com> Change-Id: I56445d1a420fec4d8385ddffc5469b7d77eab576 Reviewed-on: https://chromium-review.googlesource.com/231455 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Commit-Queue: Daniel Ehrenberg <dehrenberg@chromium.org> Tested-by: Daniel Ehrenberg <dehrenberg@chromium.org>
Diffstat (limited to 'firmware/lib/cgptlib')
-rw-r--r--firmware/lib/cgptlib/cgptlib_internal.c6
-rw-r--r--firmware/lib/cgptlib/include/cgptlib_internal.h5
2 files changed, 0 insertions, 11 deletions
diff --git a/firmware/lib/cgptlib/cgptlib_internal.c b/firmware/lib/cgptlib/cgptlib_internal.c
index e7bb2e60..5e2889c6 100644
--- a/firmware/lib/cgptlib/cgptlib_internal.c
+++ b/firmware/lib/cgptlib/cgptlib_internal.c
@@ -141,12 +141,6 @@ int CheckHeader(GptHeader *h, int is_secondary,
return 0;
}
-int IsUnusedEntry(const GptEntry *e)
-{
- static Guid zero = {{{0, 0, 0, 0, 0, {0, 0, 0, 0, 0, 0}}}};
- return !Memcmp(&zero, (const uint8_t*)(&e->type), sizeof(zero));
-}
-
int IsKernelEntry(const GptEntry *e)
{
static Guid chromeos_kernel = GPT_ENT_TYPE_CHROMEOS_KERNEL;
diff --git a/firmware/lib/cgptlib/include/cgptlib_internal.h b/firmware/lib/cgptlib/include/cgptlib_internal.h
index 8dc05914..f88bc567 100644
--- a/firmware/lib/cgptlib/include/cgptlib_internal.h
+++ b/firmware/lib/cgptlib/include/cgptlib_internal.h
@@ -149,11 +149,6 @@ void SetEntryPriority(GptEntry *e, int priority);
void SetEntryTries(GptEntry *e, int tries);
/**
- * Return 1 if the entry is unused, 0 if it is used.
- */
-int IsUnusedEntry(const GptEntry *e);
-
-/**
* Return 1 if the entry is a Chrome OS kernel partition, else 0.
*/
int IsKernelEntry(const GptEntry *e);