File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
dist/tools/riotboot_gen_hdr Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ GENHDR_SRC := $(COMMON_SRC) $(RIOT_HDR_SRC) \
1818
1919GENHDR_HDR := $(COMMON_HDR ) $(RIOT_HDR_HDR )
2020
21- CFLAGS += -g -I. -O3 -Wall -Wextra -pedantic -std=c99
21+ CFLAGS += -g -I. -O3 -Wall -Wextra
2222
2323ifeq ($(QUIET ) ,1)
2424 Q =@
Original file line number Diff line number Diff line change @@ -71,6 +71,20 @@ void riotboot_slot_jump(unsigned slot);
7171 */
7272const riotboot_hdr_t * riotboot_slot_get_hdr (unsigned slot );
7373
74+ /**
75+ * @brief Get header from currently running image slot
76+ *
77+ * @returns header of current image
78+ */
79+ static inline const riotboot_hdr_t * riotboot_slot_get_current_hdr (void )
80+ {
81+ int slot = riotboot_slot_current ();
82+ if (slot < 0 ) {
83+ return NULL ;
84+ }
85+ return riotboot_slot_get_hdr (slot );
86+ }
87+
7488/**
7589 * @brief Validate slot
7690 *
You can’t perform that action at this time.
0 commit comments