Skip to content

Commit a8f01b1

Browse files
committed
[nrf noup] settings: add support for legacy ZMS backend
To maintain backward compatibility, keep the support for the legacy ZMS backend for Settings. Signed-off-by: Riadh Ghaddab <[email protected]>
1 parent 1ed59ce commit a8f01b1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/platform/Zephyr/ConfigurationManagerImpl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@
4545
#include <zephyr/settings/settings.h>
4646
#if defined(CONFIG_SETTINGS_NVS)
4747
#include <zephyr/fs/nvs.h>
48-
#elif defined(CONFIG_SETTINGS_ZMS)
48+
#elif defined(CONFIG_SETTINGS_ZMS) || defined(CONFIG_SETTINGS_ZMS_LEGACY)
4949
#include <zephyr/fs/zms.h>
50-
#endif // CONFIG_SETTINGS_NVS || CONFIG_SETTINGS_ZMS
50+
#endif // CONFIG_SETTINGS_NVS || CONFIG_SETTINGS_ZMS || CONFIG_SETTINGS_ZMS_LEGACY
5151
#endif // CONFIG_CHIP_FACTORY_RESET_ERASE_SETTINGS
5252

5353
#ifdef CONFIG_NET_L2_OPENTHREAD
@@ -214,9 +214,9 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg)
214214
{
215215
#if defined(CONFIG_SETTINGS_NVS)
216216
status = nvs_clear(static_cast<nvs_fs *>(storage));
217-
#elif defined(CONFIG_SETTINGS_ZMS)
217+
#elif defined(CONFIG_SETTINGS_ZMS) || defined(CONFIG_SETTINGS_ZMS_LEGACY)
218218
status = zms_clear(static_cast<zms_fs *>(storage));
219-
#endif // CONFIG_SETTINGS_NVS || CONFIG_SETTINGS_ZMS
219+
#endif // CONFIG_SETTINGS_NVS || CONFIG_SETTINGS_ZMS || CONFIG_SETTINGS_ZMS_LEGACY
220220
}
221221
if (status)
222222
{

0 commit comments

Comments
 (0)