mkiiskila closed pull request #806: sys/config; add a separate syscfg for cli 
command 'config dump saved'.
URL: https://github.com/apache/mynewt-core/pull/806
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/sys/config/src/config_cli.c b/sys/config/src/config_cli.c
index 87027f8ef..6912de1b7 100644
--- a/sys/config/src/config_cli.c
+++ b/sys/config/src/config_cli.c
@@ -54,6 +54,7 @@ conf_dump_running(void)
     }
 }
 
+#if MYNEWT_VAL(CONFIG_CLI_DEBUG)
 static void
 conf_saved_one(char *name, char *val, void *cb_arg)
 {
@@ -69,6 +70,7 @@ conf_dump_saved(void)
         cs->cs_itf->csi_load(cs, conf_saved_one, NULL);
     }
 }
+#endif
 
 static int
 shell_conf_command(int argc, char **argv)
@@ -103,9 +105,11 @@ shell_conf_command(int argc, char **argv)
         if (!val || !strcmp(val, "running")) {
             conf_dump_running();
         }
+#if MYNEWT_VAL(CONFIG_CLI_DEBUG)
         if (val && !strcmp(val, "saved")) {
             conf_dump_saved();
         }
+#endif
         return 0;
     } else if (!strcmp(name, "save")) {
         conf_save();
diff --git a/sys/config/syscfg.yml b/sys/config/syscfg.yml
index 35bb9c931..3c5c82f6b 100644
--- a/sys/config/syscfg.yml
+++ b/sys/config/syscfg.yml
@@ -40,6 +40,13 @@ syscfg.defs:
         restrictions:
             - 'SHELL_TASK'
 
+    CONFIG_CLI_DEBUG:
+        description: 'CLI debug commands for accessing config'
+        value: 0
+        restrictions:
+            - 'SHELL_TASK'
+            - 'CONFIG_CLI'
+
 syscfg.defs.CONFIG_FCB:
     CONFIG_FCB_FLASH_AREA:
         description: 'BSP flash area for config'


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to