[coreboot] A lar patch with some cleanup and adding greedy name matching

Myles Watson mylesgw at gmail.com
Fri Feb 29 21:14:13 CET 2008

This patch fixes lar options parsing, a seg fault with long path names, and
makes use of functions that were already defined.  It also adds greedy name
matching for listing and extracting archives, which allows recursive descent
into the lar directory structure.

An example is:

lar -l normal/payload
  normal/payload/segment0 (172032 bytes, zeroes compressed to 1 bytes
@0x4330);loadaddress 0x0x112e60 entry 0x0x10e5fc
  normal/payload/segment1 (77384 bytes, lzma compressed to 42674 bytes
@0x4390);loadaddress 0x0x100000 entry 0x0x10e5fc
  normal/payload/segment2 (72 bytes, lzma compressed to 47 bytes
@0xeaa0);loadaddress 0x0x13ce60 entry 0x0x10e5fc
Total size = 42962B 41KB (0xa7d2)

instead of

No matching lar entries found.


file-by-file changes:

	add more options to the usage message
	use get_larsize() instead of using larsize
	rearrange errors from parsing args to be more correct

	change elfname size to MAX_PATHLEN instead of 64
	make file_in_list greedy with filename matches
	change total_size calculation to include file names
	change lar_add_entry to use header_len function instead of reinventing

Signed-off-by: Myles Watson <mylesgw at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lar_cleanup.patch
Type: text/x-patch
Size: 5030 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20080229/0015d60a/attachment.patch>

More information about the coreboot mailing list