summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-06-16 18:51:42 (GMT)
committerSimon Glass <sjg@chromium.org>2017-07-11 16:08:19 (GMT)
commit6c519f2dc4a59a9d81f087d990e24d1e6444c86d (patch)
treefdf525e5fafd09f83eb6f1bcdd1082e7ea81c57e /cmd
parent32e9ec1f8812ffe5874a2e3a0a1b8fe85c489ab8 (diff)
downloadu-boot-fsl-qoriq-6c519f2dc4a59a9d81f087d990e24d1e6444c86d.tar.xz
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>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/version.c4
1 files changed, 3 insertions, 1 deletions
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