[flashrom] Flashrom.c code analysis: cli, programmer, flasher code

Sean Nelson audiohacked at gmail.com
Wed Dec 23 23:35:48 CET 2009

On 12/23/09 2:08 PM, Carl-Daniel Hailfinger wrote:
> On 12.12.2009 10:21, Sean Nelson wrote:
>> This patch breaks out the cli, programmer, and flasher code into
>> separate files. The only file that will not cleanly compile is cli.c,
>> which is looking for the table defined in programmer.c. Files were
>> compiled with "gcc -c -o %.o %.c" in this test. I don't expect this
>> patch to be committed so no sign-off. Note, the breakdown is what I
>> assume to be the cli, programmer related code, and flash routines like
>> read, erase, probe, verify, and etc. I didn't {re,}write any functions.
> Let me counter with my function grouping, then let's compare the lists.
> To be honest, I mostly focused on separating the CLI code because that's
> what needs to be replaced or refactored most urgently. Having that stuff
> in a separate file makes it easier to tell people to go wild.
> CLI:
> main (but please note that main needs to be refactored, we still have
> too much stuff in there which is not specific to CLI at all).
> usage (needs to be refactored, other frontends may want to use the
> programmer list it generates)
> Hm. Seems I should update my main() refactoring patch to make separation
> easier before we respin this patch.
> Regards,
> Carl-Daniel
That's perfectly acceptable to me. I don't even know if I still have the 
patch anyways.

More information about the flashrom mailing list