Author: uwe Date: Sat Aug 20 16:14:22 2011 New Revision: 1417 URL: http://flashrom.org/trac/flashrom/changeset/1417
Log: Move the main() function from flashrom.c to cli_classic.c.
The file flashrom.c is part of 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.
Rename the simple wrapper cli_classic() in cli_classic.c to main(), as it's not really needed.
Signed-off-by: Uwe Hermann uwe@hermann-uwe.de Acked-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at
Modified: trunk/cli_classic.c trunk/flash.h trunk/flashrom.c
Modified: trunk/cli_classic.c ============================================================================== --- trunk/cli_classic.c Thu Aug 18 04:27:19 2011 (r1416) +++ trunk/cli_classic.c Sat Aug 20 16:14:22 2011 (r1417) @@ -96,7 +96,7 @@ exit(1); }
-int cli_classic(int argc, char *argv[]) +int main(int argc, char *argv[]) { unsigned long size; /* Probe for up to three flash chips. */
Modified: trunk/flash.h ============================================================================== --- trunk/flash.h Thu Aug 18 04:27:19 2011 (r1416) +++ trunk/flash.h Sat Aug 20 16:14:22 2011 (r1417) @@ -251,9 +251,6 @@ #define msg_pspew(...) print(MSG_BARF, __VA_ARGS__) /* programmer debug barf */ #define msg_cspew(...) print(MSG_BARF, __VA_ARGS__) /* chip debug barf */
-/* cli_classic.c */ -int cli_classic(int argc, char *argv[]); - /* layout.c */ int read_romlayout(char *name); int find_romentry(char *name);
Modified: trunk/flashrom.c ============================================================================== --- trunk/flashrom.c Thu Aug 18 04:27:19 2011 (r1416) +++ trunk/flashrom.c Sat Aug 20 16:14:22 2011 (r1417) @@ -1796,11 +1796,6 @@ } }
-int main(int argc, char *argv[]) -{ - return cli_classic(argc, argv); -} - /* FIXME: This function signature needs to be improved once doit() has a better * function signature. */