From 63d67e2b0f229b3bc5787bbf4a10a4bf625c965d Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 1 May 2019 05:48:20 +0200 Subject: [PATCH] fix: setting pm3_present in flasher. --- client/flasher.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/client/flasher.c b/client/flasher.c index e13180211..b4a24c911 100644 --- a/client/flasher.c +++ b/client/flasher.c @@ -68,19 +68,20 @@ int main(int argc, char **argv) { res = flash_load(&files[num_files], argv[i], can_write_bl); if (res < 0) return -1; - + PrintAndLogEx(NORMAL, ""); num_files++; } } char *serial_port_name = argv[1]; - - if (!OpenProxmark(serial_port_name, true, 60, true, FLASHMODE_SPEED)) { + + session.pm3_present = OpenProxmark(serial_port_name, true, 60, true, FLASHMODE_SPEED); + if (session.pm3_present) { + PrintAndLogEx(NORMAL, _GREEN_("Found")); + } else { PrintAndLogEx(ERR, "Could not find Proxmark3 on " _RED_("%s") ".\n", serial_port_name); return -1; - } else { - PrintAndLogEx(NORMAL, _GREEN_("Found")); } res = flash_start_flashing(can_write_bl, serial_port_name);