cbfstool: Eliminate global variable "arch"

Now that unused functions have been removed, the global "arch" is only
used in very few places. We can pack "arch" in the "param" structure
and pass it down to where it is actually used.

Change-Id: I255d1e2bc6b5ead91b6b4e94a0202523c4ab53dc
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-on: http://review.coreboot.org/5105
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
This commit is contained in:
Alexandru Gagniuc
2014-02-02 22:37:28 -06:00
parent 2bdc0d0bd6
commit 35850ae88e
7 changed files with 20 additions and 18 deletions

View File

@@ -51,7 +51,7 @@ static void xdr_segs(struct buffer *output,
}
}
int parse_elf_to_payload(const struct buffer *input,
struct buffer *output, comp_algo algo)
struct buffer *output, uint32_t arch, comp_algo algo)
{
Elf64_Phdr *phdr;
Elf64_Ehdr ehdr;
@@ -69,7 +69,7 @@ int parse_elf_to_payload(const struct buffer *input,
if (!compress)
return -1;
if (elf_headers(input, &ehdr, &phdr, &shdr) < 0)
if (elf_headers(input, arch, &ehdr, &phdr, &shdr) < 0)
return -1;
DEBUG("start: parse_elf_to_payload\n");