Refactor doit()

Doit() is the monster function we split off from main() when we created
cli_classic() and tried to introduce some abstraction.

doit() is a poster child of WTFs on an astronomic scale.

Make doit() less bad by factoring out self-contained code.

Corresponding to flashrom svn r1212.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Sean Nelson <audiohacked@gmail.com>
1 file changed