[flashrom] [PATCH] Move the main() function from flashrom.c to cli_classic.c

Stefan Tauner stefan.tauner at student.tuwien.ac.at
Fri Aug 19 10:39:16 CEST 2011


On Fri, 19 Aug 2011 09:59:06 +0200
Uwe Hermann <uwe at 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 at 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?
-- 
Kind regards/Mit freundlichen Grüßen, Stefan Tauner




More information about the flashrom mailing list