We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00ec1b4 commit 440ebb9Copy full SHA for 440ebb9
test-app/app_sim.c
@@ -85,15 +85,18 @@ int do_cmd(const char *cmd)
85
printf("Get TLV %04x\r\n", tlv);
86
87
size = wolfBoot_find_header(imageHdr + IMAGE_HEADER_OFFSET, tlv, &ptr);
88
- if (size >= 0 && ptr != NULL) {
+ if (size > 0 && ptr != NULL) {
89
/* From here, the value 0xAABBCCDD is at ptr */
90
- printf("TLV 0x%x:\n", tlv);
+ printf("TLV 0x%x: found. Size: %d\n", tlv, size);
91
for (i=0; i<size; i++) {
92
printf("%02X", ptr[i]);
93
}
94
printf("\n");
95
+ return 0;
96
+ } else {
97
+ printf("TLV: not found!\r\n");
98
+ return -1;
99
- return 0;
100
101
/* wrong command */
102
return -1;
0 commit comments