summaryrefslogtreecommitdiff
path: root/futility/cmd_sign.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2016-05-25 16:42:44 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-07-26 17:31:54 -0700
commitca7251286655fe8865d0089bfc23b42ffececbf3 (patch)
tree438e449305363449da687cf635cd35decba023e9 /futility/cmd_sign.c
parent2afa87360d3a4c357e4bb2d37fdff9cdefbe0ffc (diff)
downloadvboot-ca7251286655fe8865d0089bfc23b42ffececbf3.tar.gz
vboot: Disambiguate vb2.1 structs and functions
Futility needs to link against both vboot1/vboot2.0 and vboot2.1 functions. This was easy in the past because it did (vboot1 + vboot2.1) and there's no overlap. In replacing vboot1 function calls and structs with vboot2.0, now there are symbol collisions between vboot2.0 and vboot2.1. For example, both of them use a struct called vb2_signature, but the structs are defined differently. Functions which operate on those structs also overload. Rename the vb2.1 structs to start with vb21_ instead of vb2_. Do the same for vb2.1 functions which operate on vb2.1 data. BUG=chromium:611535 BRANCH=none TEST=make runtests Change-Id: I24defd87cbd9ef64239faf1a8e98ab2372d27539 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/347458 Reviewed-by: Daisuke Nojiri <dnojiri@google.com>
Diffstat (limited to 'futility/cmd_sign.c')
-rw-r--r--futility/cmd_sign.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/futility/cmd_sign.c b/futility/cmd_sign.c
index c27f71e8..acaa2f1d 100644
--- a/futility/cmd_sign.c
+++ b/futility/cmd_sign.c
@@ -27,7 +27,7 @@
#include "kernel_blob.h"
#include "util_misc.h"
#include "vb1_helper.h"
-#include "vb2_common.h"
+#include "vb21_common.h"
#include "host_key2.h"
#include "vboot_common.h"
@@ -472,11 +472,11 @@ static void print_help_rwsig(int argc, char *argv[])
"\n"
"The INFILE is a binary blob of arbitrary size."
" It is signed using the\n"
- "private key and the vb2_signature blob emitted.\n"
+ "private key and the vb21_signature blob emitted.\n"
"\n"
"If no OUTFILE is specified, the INFILE should contain"
" an existing\n"
- "vb2_signature blob near its end. The data_size from that"
+ "vb21_signature blob near its end. The data_size from that"
" signature is\n"
"used to re-sign a portion of the INFILE, and the old"
" signature blob is\n"
@@ -818,8 +818,8 @@ static int do_sign(int argc, char *argv[])
}
break;
case OPT_PRIKEY:
- if (vb2_private_key_read(&sign_option.prikey,
- optarg)) {
+ if (vb21_private_key_read(&sign_option.prikey,
+ optarg)) {
fprintf(stderr, "Error reading %s\n", optarg);
errorcnt++;
}