[Pdbg] [PATCH v2 4/8] pdbg/htm: Fix error checking condition for htm dump command
Cyril Bur
cyrilbur at gmail.com
Tue Mar 27 11:30:22 AEDT 2018
We only call into libpdbg with one HTM unit, libpdbg returns how many
HTM units it operated on. A successful calling of HTM dump would expect
a return value of 1, so not 1 is an error.
Signed-off-by: Cyril Bur <cyrilbur at gmail.com>
---
src/htm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/htm.c b/src/htm.c
index fee745d..ea3c3bb 100644
--- a/src/htm.c
+++ b/src/htm.c
@@ -190,7 +190,7 @@ static int run_dump(enum htm_type type, int optind, int argc, char *argv[])
index = pdbg_target_index(target);
assert(!pdbg_get_u64_property(target, "chip-id", &chip_id));
printf("Dumping HTM@%" PRIu64 "#%d\n", chip_id, index);
- if (htm_dump(target, 0, filename) == 1)
+ if (htm_dump(target, 0, filename) != 1)
printf("Couldn't dump HTM@%" PRIu64 "#%d\n", chip_id, index);
rc++;
}
--
2.16.3
More information about the Pdbg
mailing list