mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
display_options: Refactor to allow obtaining the banner
Move the display options code into a separate function so that the U-Boot banner can be obtained from other code. Adjust the 'version' command to use it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
@@ -17,7 +17,9 @@ const char __weak version_string[] = U_BOOT_VERSION_STRING;
|
||||
|
||||
static int do_version(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||
{
|
||||
printf("\n%s\n", version_string);
|
||||
char buf[DISPLAY_OPTIONS_BANNER_LENGTH];
|
||||
|
||||
printf(display_options_get_banner(false, buf, sizeof(buf)));
|
||||
#ifdef CC_VERSION_STRING
|
||||
puts(CC_VERSION_STRING "\n");
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user