summaryrefslogtreecommitdiff
path: root/firmware/lib/cgptlib/include/cgptlib.h
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2015-01-12 14:54:04 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-24 01:46:02 +0000
commitf620c0d6560dcb5c6b6b004bd50f4713f191d381 (patch)
tree24228a96fb5b59baaea7a81acf8829bc1b0f3272 /firmware/lib/cgptlib/include/cgptlib.h
parentf1f53b3732f235da15a50080db6e7bbd4666e390 (diff)
downloadvboot-f620c0d6560dcb5c6b6b004bd50f4713f191d381.tar.gz
cgptlib: Add functions to cgptlib API
Following changes are done to the cgptlib API in order to allow backend component of fastboot to perform erase and write operations on partitions and manipulate GPT entries: GptFindNthEntry - Returns the nth entry in GPT that matches provided GUID. GptGetEntrySizeLba - Returns size of a partition in lba. GptGetEntrySizeBytes - Returns size of a partition in bytes. GptUpdateKernelWithEntry - Given kernel entry is updated using the provided update_type. GptUpdateKernelEntry calls this function with entry for current_kernel. Add flags GPT_UPDATE_ENTRY_RESET and GPT_UPDATE_ENTRY_INVALID for calls to GptUpdateKernelEntry. These operations are used by write image and erase partition respectively. BUG=chrome-os-partner:35861 BRANCH=None TEST=Compiles successfully and all the newly added functions work as expected. Change-Id: I82c87e4c97de2d207e80209dbd4922b4bcd5880a Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/240268 Trybot-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'firmware/lib/cgptlib/include/cgptlib.h')
-rw-r--r--firmware/lib/cgptlib/include/cgptlib.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/firmware/lib/cgptlib/include/cgptlib.h b/firmware/lib/cgptlib/include/cgptlib.h
index 968ec635..df85494e 100644
--- a/firmware/lib/cgptlib/include/cgptlib.h
+++ b/firmware/lib/cgptlib/include/cgptlib.h
@@ -22,16 +22,4 @@
* GPT_ERROR_NO_VALID_KERNEL, no avaliable kernel, enters recovery mode */
int GptNextKernelEntry(GptData *gpt, uint64_t *start_sector, uint64_t *size);
-/**
- * Updates the kernel entry with the specified index, using the specified type
- * of update (GPT_UPDATE_ENTRY_*).
- *
- * On return the modified field may be set, if the GPT data has been modified
- * and should be written to disk.
- *
- * Returns GPT_SUCCESS if successful, else
- * GPT_ERROR_INVALID_UPDATE_TYPE, invalid 'update_type' is given.
- */
-int GptUpdateKernelEntry(GptData *gpt, uint32_t update_type);
-
#endif /* VBOOT_REFERENCE_CGPTLIB_H_ */