diff options
author | Simon Glass <sjg@chromium.org> | 2017-06-16 21:51:42 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-07-11 19:08:19 +0300 |
commit | 6c519f2dc4a59a9d81f087d990e24d1e6444c86d (patch) | |
tree | fdf525e5fafd09f83eb6f1bcdd1082e7ea81c57e /cmd/version.c | |
parent | 32e9ec1f8812ffe5874a2e3a0a1b8fe85c489ab8 (diff) | |
download | u-boot-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/version.c')
-rw-r--r-- | cmd/version.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/version.c b/cmd/version.c index 1be0667f09..15aab5dc18 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 |