This is an automated email from the ASF dual-hosted git repository.

kasjer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit dade6568c734cd5e01a49b0e080f3aad39a32e35
Author: Jerzy Kasenberg <[email protected]>
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 <[email protected]>
---
 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)

Reply via email to