From 19a78d7b3836c6a2ff13b7aa4816c66f3841c0d8 Mon Sep 17 00:00:00 2001 From: Reto Schneider Date: Tue, 4 Nov 2025 19:29:08 +0100 Subject: [PATCH] [lb toup] factory data: Allow deletion of corrupted flash area Without this, a corrupted factory data flash area could not be deleted by the shell command 'factory_data erase' due to the initialization code failing in the first place. On the next Zephyr update, this commit should be squashed into 5db2c73f5db428fbf9d96073fc91d426d145d1d4 ([lb toup] factory data: Add new subsystem). --- subsys/factory_data/factory_data_shell.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/subsys/factory_data/factory_data_shell.c b/subsys/factory_data/factory_data_shell.c index 2cfc4a3e0e43b..2e444d0b64cca 100644 --- a/subsys/factory_data/factory_data_shell.c +++ b/subsys/factory_data/factory_data_shell.c @@ -103,8 +103,7 @@ static int cmd_erase(const struct shell *shell_ptr, size_t argc, char *argv[]) ret = factory_data_init(); if (ret) { - shell_error(shell_ptr, "Failed to initialize: %d", ret); - return -EIO; + shell_warn(shell_ptr, "Failed to initialize (%d), but continue with erasing", ret); } ret = factory_data_erase();