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

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Wed Dec 23 23:08:28 CET 2009

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.

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.


Developer quote of the year:
"We are juggling too many chainsaws and flaming arrows and tigers."

More information about the flashrom mailing list