This is a pretty trivial patch that returns an error message when the

file is not found instead of seg faulting.

test with:

lar -a coreboot.rom nonexistant_file.bin

Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@615 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Myles Watson 2008-02-21 21:02:19 +00:00
commit 897ea2e08b

View file

@ -946,6 +946,9 @@ int lar_add_file(struct lar *lar, char *name)
ptr = mapfile(filename, &size);
if (ptr == MAP_FAILED)
return -1;
if (elfparse() && iself(ptr)) {
output_elf_segments(lar, pathname, ptr, size, thisalgo);
return 0;