summaryrefslogtreecommitdiff
path: root/cgpt/cgpt_common.c
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2014-06-20 14:33:00 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-06-26 02:41:51 +0000
commit4cb5497984642b8cbd592c14cb1912a787b2d4d7 (patch)
treeccbe3692c68a78c7e4ee27bd31d967ade51f0a3f /cgpt/cgpt_common.c
parentc9e039c1b39509cf301dc38947db021f0243c817 (diff)
downloadvboot-4cb5497984642b8cbd592c14cb1912a787b2d4d7.tar.gz
Remove cgpt app-specific symbols from libvboot_host.a
Three symbols used by the standalone cgpt executable were being referenced in the files used to create the external libvboot_host.a needed by non-vboot userspace applications. This cleans things up so those symbols don't have to be explictly defined by other repos just to link with that library. BUG=chromium:318536 BRANCH=ToT TEST=manual No new functionality, just code cleanup. Tested with make runtests runfutiltests runlongtests Change-Id: Ibc77fb9800c89d7109ebf38d4d6729f52665722f Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/205667 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'cgpt/cgpt_common.c')
-rw-r--r--cgpt/cgpt_common.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/cgpt/cgpt_common.c b/cgpt/cgpt_common.c
index 1a1c9e86..c8a069a4 100644
--- a/cgpt/cgpt_common.c
+++ b/cgpt/cgpt_common.c
@@ -41,17 +41,16 @@ void EnableNandImage(int bytes_per_page, int pages_per_block,
void Error(const char *format, ...) {
va_list ap;
va_start(ap, format);
- fprintf(stderr, "ERROR: %s %s: ", progname, command);
+ fprintf(stderr, "ERROR: ");
vfprintf(stderr, format, ap);
va_end(ap);
}
-
int CheckValid(const struct drive *drive) {
if ((drive->gpt.valid_headers != MASK_BOTH) ||
(drive->gpt.valid_entries != MASK_BOTH)) {
- fprintf(stderr, "\nWARNING: one of the GPT header/entries is invalid, "
- "please run '%s repair'\n", progname);
+ fprintf(stderr,
+ "\nWARNING: one of the GPT header/entries is invalid\n\n");
return CGPT_FAILED;
}
return CGPT_OK;
@@ -1180,3 +1179,7 @@ void PMBRToStr(struct pmbr *pmbr, char *str, unsigned int buflen) {
require(snprintf(str, buflen, "PMBR (Boot GUID: %s)", buf) < buflen);
}
}
+
+/* Optional */
+int __GenerateGuid(Guid *newguid) { return CGPT_FAILED; };
+int GenerateGuid(Guid *newguid) __attribute__((weak, alias("__GenerateGuid")));