From 6c519f2dc4a59a9d81f087d990e24d1e6444c86d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 16 Jun 2017 12:51:42 -0600 Subject: 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 Reviewed-by: Bin Meng Tested-by: Bin Meng Tested-by: Stephen Warren --- cmd/version.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cmd/version.c') diff --git a/cmd/version.c b/cmd/version.c index 1be0667..15aab5d 100644 --- a/cmd/version.c +++ b/cmd/version.c @@ -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 -- cgit v1.1