You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2017/11/28 19:07:38 UTC

[GitHub] mkiiskila closed pull request #681: sys/config; adjust fs_mkdir() for config storage directory to take place

mkiiskila closed pull request #681: sys/config; adjust fs_mkdir() for config storage directory to take place
URL: https://github.com/apache/mynewt-core/pull/681
 
 
   

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/pkg.yml b/sys/config/pkg.yml
index a2a887b3c..4ff1e2679 100644
--- a/sys/config/pkg.yml
+++ b/sys/config/pkg.yml
@@ -37,3 +37,4 @@ pkg.deps.CONFIG_NFFS:
 
 pkg.init:
     config_pkg_init: 50
+    config_pkg_init_stage2: 220
diff --git a/sys/config/src/config_init.c b/sys/config/src/config_init.c
index c61cc1ae5..9af1d8407 100644
--- a/sys/config/src/config_init.c
+++ b/sys/config/src/config_init.c
@@ -40,7 +40,6 @@ config_init_fs(void)
 {
     int rc;
 
-    fs_mkdir(MYNEWT_VAL(CONFIG_NFFS_DIR));
     rc = conf_file_src(&config_init_conf_file);
     SYSINIT_PANIC_ASSERT(rc == 0);
     rc = conf_file_dst(&config_init_conf_file);
@@ -105,3 +104,14 @@ config_pkg_init(void)
     config_init_fcb();
 #endif
 }
+
+void
+config_pkg_init_stage2(void)
+{
+    /*
+     * Must be called after root FS has been initialized.
+     */
+#if MYNEWT_VAL(CONFIG_NFFS)
+    fs_mkdir(MYNEWT_VAL(CONFIG_NFFS_DIR));
+#endif
+}


 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services