summaryrefslogtreecommitdiff
path: root/util/cbfstool
diff options
context:
space:
mode:
authorSol Boucher <solb@chromium.org>2015-05-07 21:00:05 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-07-16 17:39:17 +0200
commit6533671ce015227401cec441b1af51d2bd626ec4 (patch)
treec5b4c66635c163c77bbdd5c48e46ec529ff9d9b9 /util/cbfstool
parent158dd5527cff6864a0de42a65902a9d07f7d8b47 (diff)
cbfstool: rename field
With introducing hash algorithms, 'algo' is ambiguous, so rename it to 'compression' instead. Change-Id: Ief3d39067df650d03030b5ca9e8677861ce682ed Signed-off-by: Sol Boucher <solb@chromium.org> Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Change-Id: I1a117a9473e895feaf455bb30d0f945f57de51eb Original-Signed-off-by: Sol Boucher <solb@chromium.org> Reviewed-on: http://review.coreboot.org/10930 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'util/cbfstool')
-rw-r--r--util/cbfstool/cbfstool.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/util/cbfstool/cbfstool.c b/util/cbfstool/cbfstool.c
index 901fe5c94e..cae1227200 100644
--- a/util/cbfstool/cbfstool.c
+++ b/util/cbfstool/cbfstool.c
@@ -75,14 +75,14 @@ static struct param {
bool fill_partial_downward;
bool show_immutable;
int fit_empty_entries;
- enum comp_algo algo;
+ enum comp_algo compression;
/* for linux payloads */
char *initrd;
char *cmdline;
} param = {
/* All variables not listed are initialized as zero. */
.arch = CBFS_ARCHITECTURE_UNKNOWN,
- .algo = CBFS_COMPRESS_NONE,
+ .compression = CBFS_COMPRESS_NONE,
.headeroffset = ~0,
.region_name = SECTION_NAME_PRIMARY_CBFS,
};
@@ -226,7 +226,7 @@ static int cbfstool_convert_mkstage(struct buffer *buffer, uint32_t *offset)
{
struct buffer output;
int ret;
- ret = parse_elf_to_stage(buffer, &output, param.algo, offset,
+ ret = parse_elf_to_stage(buffer, &output, param.compression, offset,
param.ignore_section);
if (ret != 0)
return -1;
@@ -242,16 +242,16 @@ static int cbfstool_convert_mkpayload(struct buffer *buffer,
struct buffer output;
int ret;
/* per default, try and see if payload is an ELF binary */
- ret = parse_elf_to_payload(buffer, &output, param.algo);
+ ret = parse_elf_to_payload(buffer, &output, param.compression);
/* If it's not an ELF, see if it's a UEFI FV */
if (ret != 0)
- ret = parse_fv_to_payload(buffer, &output, param.algo);
+ ret = parse_fv_to_payload(buffer, &output, param.compression);
/* If it's neither ELF nor UEFI Fv, try bzImage */
if (ret != 0)
ret = parse_bzImage_to_payload(buffer, &output,
- param.initrd, param.cmdline, param.algo);
+ param.initrd, param.cmdline, param.compression);
/* Not a supported payload type */
if (ret != 0) {
@@ -273,7 +273,7 @@ static int cbfstool_convert_mkflatpayload(struct buffer *buffer,
if (parse_flat_binary_to_payload(buffer, &output,
param.loadaddress,
param.entrypoint,
- param.algo) != 0) {
+ param.compression) != 0) {
return -1;
}
buffer_delete(buffer);
@@ -975,9 +975,9 @@ int main(int argc, char **argv)
break;
case 'c':
if (!strncasecmp(optarg, "lzma", 5))
- param.algo = CBFS_COMPRESS_LZMA;
+ param.compression = CBFS_COMPRESS_LZMA;
else if (!strncasecmp(optarg, "none", 5))
- param.algo = CBFS_COMPRESS_NONE;
+ param.compression = CBFS_COMPRESS_NONE;
else
WARN("Unknown compression '%s'"
" ignored.\n", optarg);