On Fri, 30 Aug 2013 02:00:34 +0200 Stefan Tauner stefan.tauner@student.tuwien.ac.at wrote:
This was mainly driven by getting rid of cli_classic_abort_usage() in cli_classic.c.
I forgot to mention something and give a rationale for it: Thereby we also get rid of teasing the user to run flashrom again to show usage information.
If we think the user should see the usage information we should show it to him or at least a short syntax summary (which we pretty much lack currently: the programmer parameter syntax is not really well explained). (Small) GNU apps seem to favor printing a similar message like we do. nmap, rsync give their whole usage information which is a bit of a pain because it is so long (unlike flashrom's), ping and hd are examples that just print a syntax summary (but they lack a complete usage help). All of the above is stupid. :P Printing a wall of text does not help and is even counterproductive if one can not scroll. Printing how to print help is also a little bit silly if that help text is not very long anyway. The right™ thing in the case of flashrom is IMHO to print the complete usage help (after improving it to explain the programmer parameter syntax better).
RFC.
This makes the whole main function more consistent and fixes a myriad of (theoretical) memory leaks. This slightly changes output in most error cases. doit() stops calling programmer_shutdown() with this patch, beware.