Skip to content

Commit fc030a9

Browse files
committed
mgmt/imgmgr: Remove obsolete variable
Variable was never set and was always 0.
1 parent 1a4b85f commit fc030a9

File tree

5 files changed

+4
-8
lines changed

5 files changed

+4
-8
lines changed

boot/stub/src/bootutil.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
#include <defs/error.h>
2121
#include "bootutil/bootutil.h"
2222

23-
int boot_current_slot;
24-
2523
int boot_swap_type(void)
2624
{
2725
return BOOT_SWAP_TYPE_NONE;

mgmt/imgmgr/include/imgmgr/imgmgr.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ extern "C" {
4444
#define IMGMGR_STATE_F_ACTIVE 0x04
4545
#define IMGMGR_STATE_F_PERMANENT 0x08
4646

47-
extern int boot_current_slot;
48-
4947
void imgmgr_module_init(void);
5048

5149
struct image_version;

mgmt/imgmgr/src/imgmgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ imgr_get_current_hash(uint8_t *hash, uint16_t hashlen)
154154
int
155155
imgr_my_version(struct image_version *ver)
156156
{
157-
return img_mgmt_read_info(boot_current_slot, ver, NULL, NULL);
157+
return img_mgmt_read_info(0, ver, NULL, NULL);
158158
}
159159

160160
/*

sys/coredump/src/coredump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ coredump_dump(void *regs, int regs_sz)
9696
off = sizeof(hdr);
9797
dump_core_tlv(fa, &off, &tlv, regs);
9898

99-
if (img_mgmt_read_info(boot_current_slot, &ver, hash, NULL) == 0) {
99+
if (img_mgmt_read_info(0, &ver, hash, NULL) == 0) {
100100
tlv.ct_type = COREDUMP_TLV_IMAGE;
101101
tlv.ct_len = IMGMGR_HASH_LEN;
102102

sys/reboot/src/log_reboot.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ log_reboot_write(const struct log_reboot_info *info)
192192
}
193193
#endif
194194

195-
rc = img_mgmt_read_info(boot_current_slot, &ver, hash, &flags);
195+
rc = img_mgmt_read_info(0, &ver, hash, &flags);
196196
if (rc != 0) {
197197
return rc;
198198
}
@@ -245,7 +245,7 @@ log_reboot_write(const struct log_reboot_info *info)
245245
cbor_encode_int(&map, info->pc);
246246
}
247247

248-
state_flags = img_mgmt_state_flags(boot_current_slot);
248+
state_flags = img_mgmt_state_flags(0);
249249
cbor_encode_text_stringz(&map, "flags");
250250
off = 0;
251251
buf[0] = '\0';

0 commit comments

Comments
 (0)