cbfstool: move iself() to eflheaders.c
The only user of iself() was in elfheaders.c. Move it there, and make it local to the compilation unit. Change-Id: I0d919ce372f6e2fce75885fb4fcba20d985979b3 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/5369 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Marc Jones <marc.jones@se-eng.com>
This commit is contained in:
parent
a983cea5b9
commit
aa8784c2d1
|
@ -23,7 +23,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <libgen.h>
|
||||
#include "elf.h"
|
||||
#include "common.h"
|
||||
#include "cbfs.h"
|
||||
|
||||
|
@ -137,12 +136,6 @@ uint32_t string_to_arch(const char *arch_string)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int iself(unsigned char *input)
|
||||
{
|
||||
Elf32_Ehdr *ehdr = (Elf32_Ehdr *) input;
|
||||
return !memcmp(ehdr->e_ident, ELFMAG, 4);
|
||||
}
|
||||
|
||||
static struct filetypes_t {
|
||||
uint32_t type;
|
||||
const char *name;
|
||||
|
|
|
@ -109,8 +109,6 @@ uint32_t string_to_arch(const char *arch_string);
|
|||
|
||||
#define ALIGN(val, by) (((val) + (by)-1)&~((by)-1))
|
||||
|
||||
int iself(unsigned char *input);
|
||||
|
||||
typedef void (*comp_func_ptr) (char *, int, char *, int *);
|
||||
typedef enum { CBFS_COMPRESS_NONE = 0, CBFS_COMPRESS_LZMA = 1 } comp_algo;
|
||||
|
||||
|
|
|
@ -121,6 +121,13 @@
|
|||
* in the buffer struct.
|
||||
*/
|
||||
|
||||
|
||||
static int iself(const void *input)
|
||||
{
|
||||
const Elf32_Ehdr *ehdr = input;
|
||||
return !memcmp(ehdr->e_ident, ELFMAG, 4);
|
||||
}
|
||||
|
||||
/* Get the ident array, so we can figure out
|
||||
* endian-ness, word size, and in future other useful
|
||||
* parameters
|
||||
|
|
Loading…
Reference in New Issue