Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorあく <alleteam@gmail.com>2021-07-02 18:12:05 +0300
committerGitHub <noreply@github.com>2021-07-02 18:12:05 +0300
commit721f83dd836be30f8e7b3b45ee05acc88ff0430b (patch)
treef5afd07fad38a4dbda5d4d6cb52d7fc0eb952b08 /applications/cli
parent602c125ef5255ccd8563fe521401dc571e7a1327 (diff)
[FL-1516] Fix name read on device without OTP (#561)
* Fix name read on device without OTP * Dolphin: proper name handling.
Diffstat (limited to 'applications/cli')
-rw-r--r--applications/cli/cli_commands.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/applications/cli/cli_commands.c b/applications/cli/cli_commands.c
index df04f169..6900a425 100644
--- a/applications/cli/cli_commands.c
+++ b/applications/cli/cli_commands.c
@@ -15,7 +15,10 @@
void cli_command_device_info(Cli* cli, string_t args, void* context) {
// Model name
printf("hardware_model : %s\r\n", api_hal_version_get_model_name());
- printf("hardware_name : %s\r\n", api_hal_version_get_name_ptr());
+ const char* name = api_hal_version_get_name_ptr();
+ if(name) {
+ printf("hardware_name : %s\r\n", name);
+ }
// Unique ID
printf("hardware_uid : ");
@@ -191,27 +194,6 @@ void cli_command_log(Cli* cli, string_t args, void* context) {
furi_stdglue_set_global_stdout_callback(NULL);
}
-void cli_command_hw_info(Cli* cli, string_t args, void* context) {
- printf(
- "%-20s %d.F%dB%dC%d\r\n",
- "HW version:",
- api_hal_version_get_hw_version(),
- api_hal_version_get_hw_target(),
- api_hal_version_get_hw_body(),
- api_hal_version_get_hw_connect());
- time_t time = api_hal_version_get_hw_timestamp();
- char time_string[26] = "";
- ctime_r(&time, time_string);
- if(time_string[strlen(time_string) - 1] == '\n') {
- time_string[strlen(time_string) - 1] = '\0';
- }
- printf("%-20s %s\r\n", "Production date:", time_string);
- const char* name = api_hal_version_get_name_ptr();
- if(name) {
- printf("%-20s %s", "Name:", name);
- }
-}
-
void cli_command_vibro(Cli* cli, string_t args, void* context) {
if(!string_cmp(args, "0")) {
NotificationApp* notification = furi_record_open("notification");