Major changes are: - Expose settings backend API to enable custom backend support. - Add a new CONFIG_SETTINGS_CUSTOM backend to allow registering a custom backend. - Change api of the handlers h_set() routines to allow for backend-specific read callbacks. - Provide a customizable settings_backend_init() routine for custom backends. - Move runtime settings support to be its own backend. Signed-off-by: François Delawarde <fnde@oticon.com>
24 lines
505 B
C
24 lines
505 B
C
/*
|
|
* Copyright (c) 2018 Nordic Semiconductor ASA
|
|
* Copyright (c) 2015 Runtime Inc
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include "settings_test.h"
|
|
|
|
void config_empty_lookups(void)
|
|
{
|
|
int rc;
|
|
char name[80];
|
|
char tmp[64];
|
|
|
|
strcpy(name, "foo/bar");
|
|
rc = settings_runtime_set(name, "tmp", 4);
|
|
zassert_true(rc != 0, "settings_runtime_set callback");
|
|
|
|
strcpy(name, "foo/bar");
|
|
rc = settings_runtime_get(name, tmp, sizeof(tmp));
|
|
zassert_true(rc == -EINVAL, "settings_runtime_get callback");
|
|
}
|