[flashrom] [PATCH] Cleanup flashrom.c, move functions, part 1

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Fri Jul 29 23:27:16 CEST 2011


Am 29.07.2011 14:10 schrieb Uwe Hermann:
> Cleanup flashrom.c, move functions where they belong.
>
> The file flashrom.c is a random collection of unrelated stuff and should
> be refactored a bit. This is part 1 of that effort.
>   

Does a feature or bugfix depend on this?
I don't see immediate benefits of this patch, and it will break quite a
few unmerged patches. If our patchwork queue was ~10 patches instead of
150 patches, the effort to update them would be manageable, but right
now this is mostly making life harder for people who want to merge
pending patches.


>  - Move main() to cli_classic.c where it belongs, it's the main function of
>    the CLI program. Other frontends/GUIs will have their own main() function.
>
>  - Move programmer_table[] from flashrom.c to programmer.c where it belongs.
>
>  - Move the following functions to print.c as they're purely printing
>    related: nonfatal_help_message(), emergency_help_message(),
>    list_programmers_linebreak(), print_sysinfo(), print_version(), and
>    print_banner().
>
>  - Drop list_programmers(), as it's never used.
>   

list_programmers() was introduced to have a useful programmer list for
libflashrom. Unless libflashrom is dead and buried, I'd like to keep it in.


> Signed-off-by: Uwe Hermann <uwe at hermann-uwe.de>
>   


Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the flashrom mailing list