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:
@@ -62,8 +62,6 @@ int buffer_write_file(struct buffer *buffer, const char *filename);
|
||||
/* Destroys a memory buffer. */
|
||||
void buffer_delete(struct buffer *buffer);
|
||||
|
||||
extern uint32_t arch;
|
||||
|
||||
uint32_t string_to_arch(const char *arch_string);
|
||||
|
||||
#define ALIGN(val, by) (((val) + (by)-1)&~((by)-1))
|
||||
@@ -79,7 +77,7 @@ uint64_t intfiletype(const char *name);
|
||||
|
||||
/* cbfs-mkpayload.c */
|
||||
int parse_elf_to_payload(const struct buffer *input,
|
||||
struct buffer *output, comp_algo algo);
|
||||
struct buffer *output, uint32_t arch, comp_algo algo);
|
||||
int parse_fv_to_payload(const struct buffer *input,
|
||||
struct buffer *output, comp_algo algo);
|
||||
int parse_bzImage_to_payload(const struct buffer *input,
|
||||
@@ -92,7 +90,7 @@ int parse_flat_binary_to_payload(const struct buffer *input,
|
||||
comp_algo algo);
|
||||
/* cbfs-mkstage.c */
|
||||
int parse_elf_to_stage(const struct buffer *input, struct buffer *output,
|
||||
comp_algo algo, uint32_t *location);
|
||||
uint32_t arch, comp_algo algo, uint32_t *location);
|
||||
|
||||
void print_supported_filetypes(void);
|
||||
|
||||
|
Reference in New Issue
Block a user