diff options
author | Vivek Goyal <vgoyal@in.ibm.com> | 2006-09-21 14:51:05 -0400 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2006-10-06 12:46:16 +0900 |
commit | dd3f52d4668938b9b3ad91607d7df3cf337b0863 (patch) | |
tree | 7b3b51e254421e8b08d48f68b87685c706946498 /kexec/kexec-elf-exec.c | |
parent | 46ecc6c6c77b1fab20b08286209631a00eb1049e (diff) |
kexec-tools: Add a new parameter to generic elf parsing functions
o Adding a new parameter to elf functions. This flag can be used to alter
the function behaviour. Currently only one bit is being used for skipping
the elf file len check while builing the elf info.
Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec/kexec-elf-exec.c')
-rw-r--r-- | kexec/kexec-elf-exec.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kexec/kexec-elf-exec.c b/kexec/kexec-elf-exec.c index ec00a05..f65a625 100644 --- a/kexec/kexec-elf-exec.c +++ b/kexec/kexec-elf-exec.c @@ -11,11 +11,12 @@ static const int probe_debug = 0; -int build_elf_exec_info(const char *buf, off_t len, struct mem_ehdr *ehdr) +int build_elf_exec_info(const char *buf, off_t len, struct mem_ehdr *ehdr, + uint32_t flags) { struct mem_phdr *phdr, *end_phdr; int result; - result = build_elf_info(buf, len, ehdr); + result = build_elf_info(buf, len, ehdr, flags); if (result < 0) { return result; } @@ -136,11 +137,11 @@ int elf_exec_load(struct mem_ehdr *ehdr, struct kexec_info *info) } void elf_exec_build_load(struct kexec_info *info, struct mem_ehdr *ehdr, - const char *buf, off_t len) + const char *buf, off_t len, uint32_t flags) { int result; /* Parse the Elf file */ - result = build_elf_exec_info(buf, len, ehdr); + result = build_elf_exec_info(buf, len, ehdr, flags); if (result < 0) { die("ELF exec parse failed\n"); } |