Skip to content

Commit

Permalink
Merge pull request #2693 from vikrant-proxy/config-max-len
Browse files Browse the repository at this point in the history
sys/config: Make the maximum value length configurable
  • Loading branch information
vrahane committed Oct 11, 2021
2 parents d8737c0 + 4aff454 commit 8507a56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sys/config/include/config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <os/queue.h>
#include <stdint.h>
#include <stdbool.h>
#include <syscfg/syscfg.h>

#ifdef __cplusplus
extern "C" {
Expand All @@ -36,7 +37,7 @@ extern "C" {

#define CONF_MAX_DIR_DEPTH 8 /* max depth of config tree */
#define CONF_MAX_NAME_LEN (8 * CONF_MAX_DIR_DEPTH)
#define CONF_MAX_VAL_LEN 256
#define CONF_MAX_VAL_LEN MYNEWT_VAL(CONFIG_MAX_VAL_LEN)
#define CONF_NAME_SEPARATOR "/"

#define CONF_NMGR_OP 0
Expand Down
4 changes: 4 additions & 0 deletions sys/config/syscfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ syscfg.defs:
description: >
Config CLI commands read 1, write 2, read/write 3
value: 3
CONFIG_MAX_VAL_LEN:
description: >
Max length of a value stored in the config FCB.
value: 256

syscfg.defs.(CONFIG_FCB || CONFIG_FCB2):
CONFIG_FCB_FLASH_AREA:
Expand Down

0 comments on commit 8507a56

Please sign in to comment.