diff --git a/applications/cli/cli.c b/applications/cli/cli.c index a036d46c..b87404ce 100644 --- a/applications/cli/cli.c +++ b/applications/cli/cli.c @@ -71,16 +71,13 @@ void cli_print_version(const Version* version) { } void cli_motd() { - const Version* version; printf("Flipper cli.\r\n"); - version = (const Version*)api_hal_version_get_boot_version(); printf("Bootloader\r\n"); - cli_print_version(version); + cli_print_version(api_hal_version_get_boot_version()); - version = (const Version*)api_hal_version_get_fw_version(); printf("Firmware\r\n"); - cli_print_version(version); + cli_print_version(api_hal_version_get_fw_version()); } void cli_nl() { diff --git a/applications/cli/cli_commands.c b/applications/cli/cli_commands.c index a9a32518..38e544fa 100644 --- a/applications/cli/cli_commands.c +++ b/applications/cli/cli_commands.c @@ -29,7 +29,11 @@ void cli_command_help(string_t args, void* context) { void cli_command_version(string_t args, void* context) { (void)args; (void)context; - cli_print_version(); + printf("Bootloader\r\n"); + cli_print_version(api_hal_version_get_boot_version()); + + printf("Firmware\r\n"); + cli_print_version(api_hal_version_get_fw_version()); } void cli_command_uuid(string_t args, void* context) { diff --git a/applications/cli/cli_i.h b/applications/cli/cli_i.h index da8b49d4..578131e8 100644 --- a/applications/cli/cli_i.h +++ b/applications/cli/cli_i.h @@ -39,6 +39,6 @@ struct Cli { Cli* cli_alloc(); void cli_free(Cli* cli); void cli_reset_state(Cli* cli); -void cli_print_version(); +void cli_print_version(const Version* version); void cli_putc(char c); void cli_stdout_callback(void* _cookie, const char* data, size_t size);