mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 14:11:15 +02:00
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. Corresponding to flashrom svn r1417. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
This commit is contained in:
@ -96,7 +96,7 @@ static void cli_classic_abort_usage(void)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int cli_classic(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
unsigned long size;
|
unsigned long size;
|
||||||
/* Probe for up to three flash chips. */
|
/* Probe for up to three flash chips. */
|
||||||
|
3
flash.h
3
flash.h
@ -251,9 +251,6 @@ int print(int type, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
|
|||||||
#define msg_pspew(...) print(MSG_BARF, __VA_ARGS__) /* programmer debug barf */
|
#define msg_pspew(...) print(MSG_BARF, __VA_ARGS__) /* programmer debug barf */
|
||||||
#define msg_cspew(...) print(MSG_BARF, __VA_ARGS__) /* chip 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 */
|
/* layout.c */
|
||||||
int read_romlayout(char *name);
|
int read_romlayout(char *name);
|
||||||
int find_romentry(char *name);
|
int find_romentry(char *name);
|
||||||
|
@ -1796,11 +1796,6 @@ void check_chip_supported(const struct flashchip *flash)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
return cli_classic(argc, argv);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FIXME: This function signature needs to be improved once doit() has a better
|
/* FIXME: This function signature needs to be improved once doit() has a better
|
||||||
* function signature.
|
* function signature.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user