See patch.
Uwe.
On Fri, 19 Aug 2011 09:59:06 +0200 Uwe Hermann uwe@hermann-uwe.de wrote:
Move the main() function from flashrom.c to cli_classic.c.
The file flsahrom.c is part if libflashrom and should thus not contain a
^^^^^^^^^^ ;)
main() function, that would break compilation of all frontends using libflashrom. Also, cli_classic.c is the right place anyway, as it's the main() of the CLI tool.
Signed-off-by: Uwe Hermann uwe@hermann-uwe.de
Index: cli_classic.c
--- cli_classic.c (Revision 1416) +++ cli_classic.c (Arbeitskopie) @@ -444,3 +444,9 @@ programmer_shutdown(); return ret; }
+int main(int argc, char *argv[]) +{
- return cli_classic(argc, argv);
+}
can't we just rename cli_classic to main and get rid of the wrapper function? what's the purpose of it anyway?
Am Freitag, den 19.08.2011, 10:39 +0200 schrieb Stefan Tauner:
On Fri, 19 Aug 2011 09:59:06 +0200 Uwe Hermann wrote:
Move the main() function from flashrom.c to cli_classic.c.
The file flsahrom.c is part if libflashrom and should thus not contain a
^^^^^^^^^^ ;)
^^ s/if/of/
[…]
Thanks,
Paul
can't we just rename cli_classic to main and get rid of the wrapper function? what's the purpose of it anyway?
I find it useful for globals init code (will post some patches in a day or few) :)
Uwe, are you going to send patches removing exit() calls? :)
Thanks, Tadas
On Fri, Aug 19, 2011 at 06:59:14PM +0300, Tadas Slotkus wrote:
can't we just rename cli_classic to main and get rid of the wrapper function? what's the purpose of it anyway?
I find it useful for globals init code (will post some patches in a day or few) :)
Not sure what you are referring to, but that should be easily doable in the main() too then?
Updated patch attached.
As discussed with dhendrix on IRC, the Google/Chromium git tree will not have a problem with this patch, they use a cli_mfg() which will get its own main() and cli_mfg.o will be linked in the Makefile respectively (instead of cli_classsic.o).
Uwe, are you going to send patches removing exit() calls? :)
Maybe, yes, but feel free to send your own if you work on that, might take a while here...
Uwe.
On Fri, 19 Aug 2011 21:26:12 +0200 Uwe Hermann uwe@hermann-uwe.de wrote:
Updated patch attached.
As discussed with dhendrix on IRC, the Google/Chromium git tree will not have a problem with this patch, they use a cli_mfg() which will get its own main() and cli_mfg.o will be linked in the Makefile respectively (instead of cli_classsic.o).
Acked-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at
On Sat, Aug 20, 2011 at 08:10:26AM +0200, Stefan Tauner wrote:
Acked-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at
Thanks, r1417.
Uwe.