You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by je...@apache.org on 2026/07/03 06:31:10 UTC
(mynewt-core) 03/06: sys/id: Register conf_handler statically
This is an automated email from the ASF dual-hosted git repository.
kasjer pushed a commit to branch kasjer/removeme
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 70bb0c003644356d7a78ce36c08d31c46b368c53
Author: Jerzy Kasenberg <je...@codecoup.pl>
AuthorDate: Wed May 6 09:07:37 2026 +0200
sys/id: Register conf_handler statically
Now id_conf handler is statically registered
at build time.
Signed-off-by: Jerzy Kasenberg <je...@codecoup.pl>
---
sys/id/pkg.yml | 2 ++
sys/id/src/id.c | 7 ++-----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/sys/id/pkg.yml b/sys/id/pkg.yml
index ac6cceff0..4824b2b66 100644
--- a/sys/id/pkg.yml
+++ b/sys/id/pkg.yml
@@ -33,5 +33,7 @@ pkg.deps:
- "@apache-mynewt-core/sys/mfg"
- "@apache-mynewt-core/encoding/base64"
+pkg.whole_archive: true
+
pkg.init:
id_init: 'MYNEWT_VAL(ID_SYSINIT_STAGE)'
diff --git a/sys/id/src/id.c b/sys/id/src/id.c
index 4a6a2e5f8..8a8ee1bf6 100644
--- a/sys/id/src/id.c
+++ b/sys/id/src/id.c
@@ -236,14 +236,11 @@ id_read_mfghash(void)
void
id_init(void)
{
- int rc;
-
/* Ensure this function only gets called by sysinit. */
SYSINIT_ASSERT_ACTIVE();
- rc = conf_register(&id_conf);
- SYSINIT_PANIC_ASSERT(rc == 0);
-
/* Attempt to read the manufacturing image hash from the meta region. */
id_read_mfghash();
}
+
+STATIC_CONF_HANDLER(id_conf)