summaryrefslogtreecommitdiff
path: root/cgpt/cgpt_common.c
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2014-06-23 17:48:33 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-07-09 03:29:57 +0000
commit18e03706df6ab4256a89f4e578ecf0f165641c8a (patch)
tree0536d6cc3a0a00289565514a9f87bcfff3a05882 /cgpt/cgpt_common.c
parent782990277ac7d6730db4c43c2b5632de93396921 (diff)
downloadvboot-18e03706df6ab4256a89f4e578ecf0f165641c8a.tar.gz
Clean up exported Mtd* functions
A lot of functions were added some time ago, nominally to support keeping the firmware in an MTD device that wasn't formatted with the GPT headers. That work was never completed, so these functions aren't used anywhere. We may want to resurrect this work at some future point. Until then, this CL just moves some of the functions into an "unused" file. BUG=chromium:231567 BRANCH=ToT TEST=manual All tests pass, all firmware and external repos build. Change-Id: I420dd52d1cea0418cedf2f8e834c61145915f20c Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/207037 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'cgpt/cgpt_common.c')
-rw-r--r--cgpt/cgpt_common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cgpt/cgpt_common.c b/cgpt/cgpt_common.c
index ff3ae696..bfc13864 100644
--- a/cgpt/cgpt_common.c
+++ b/cgpt/cgpt_common.c
@@ -156,7 +156,7 @@ static int get_hex_char_value(char ch) {
return -1;
}
-int TryInitMtd(const char *dev) {
+static int TryInitMtd(const char *dev) {
static int already_inited = 0;
if (already_inited)
return nand.use_host_ioctl;
@@ -298,7 +298,7 @@ int MtdSave(struct drive *drive) {
sizeof(mtd->primary));
}
-int GptLoad(struct drive *drive, uint32_t sector_bytes) {
+static int GptLoad(struct drive *drive, uint32_t sector_bytes) {
drive->gpt.sector_bytes = sector_bytes;
if (drive->size % drive->gpt.sector_bytes) {
Error("Media size (%llu) is not a multiple of sector size(%d)\n",
@@ -332,7 +332,7 @@ int GptLoad(struct drive *drive, uint32_t sector_bytes) {
return 0;
}
-int GptSave(struct drive *drive) {
+static int GptSave(struct drive *drive) {
int errors = 0;
if (drive->gpt.modified & GPT_MODIFIED_HEADER1) {
if (CGPT_OK != Save(drive, drive->gpt.primary_header,
@@ -838,7 +838,7 @@ void PrintTypes(void) {
printf("\n");
}
-GptHeader* GetGptHeader(const GptData *gpt) {
+static GptHeader* GetGptHeader(const GptData *gpt) {
if (gpt->valid_headers & MASK_PRIMARY)
return (GptHeader*)gpt->primary_header;
else if (gpt->valid_headers & MASK_SECONDARY)