/[Development]
ViewVC logotype

Revision 4654


Jump to revision: Previous Next
Author: stepan
Date: Tue Sep 22 15:58:19 2009 UTC (3 years, 7 months ago)
Changed paths: 1
Log Message:
This separates the code for each command in cbfstool. For the good and for the
bad: It brings a certain amount of code duplication (some of which can be
cleaned up again, or get rid of by proper refactoring).
On the other hand now there's a very simple code flow for each command, rather
than for each operation. ie.

adding a file to a cbfs means:
 - open the cbfs
 - add the file
 - close the cbfs

rather than

open the cbfs:
 - do this for add, remove, but not for create

create a new lar
 - if we don't have an open one yet

add a file:
 - if we didn't bail out before

close the file:
 - if we didn't bail out before


The short term benefit is that this fixes a problem where cbfstool was trying
to add a file if you gave a non-existing command because it bailed out on
known, not on unknown commands.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>



Changed paths

Path Details
Directorytrunk/coreboot-v2/util/cbfstool/cbfstool.c modified , text changed

Stefan Reinauer">Stefan Reinauer
ViewVC Help
Powered by ViewVC 1.1.15