From 577b1c27f5baab911609412a5dc15a95b92504d9 Mon Sep 17 00:00:00 2001 From: Michael Farrell Date: Mon, 9 Jul 2018 15:49:03 +0800 Subject: [PATCH 1/2] Allow disabling unlink() with -DNO_UNLINK. (#625) --- client/comms.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/comms.c b/client/comms.c index be0cfd10..2030f8f3 100644 --- a/client/comms.c +++ b/client/comms.c @@ -12,7 +12,7 @@ #include "comms.h" #include -#ifdef __linux__ +#if defined(__linux__) && !defined(NO_UNLINK) #include // for unlink() #endif #include "uart.h" @@ -339,8 +339,10 @@ void CloseProxmark(void) { uart_close(sp); } -#ifdef __linux__ +#if defined(__linux__) && !defined(NO_UNLINK) // Fix for linux, it seems that it is extremely slow to release the serial port file descriptor /dev/* + // + // This may be disabled at compile-time with -DNO_UNLINK (used for a JNI-based serial port on Android). if (serial_port_name) { unlink(serial_port_name); } From b2e0ac5d3bd01ac9383d321efc483304cc7e0d6d Mon Sep 17 00:00:00 2001 From: pwpiwi Date: Thu, 19 Jul 2018 18:01:18 +0200 Subject: [PATCH 2/2] fix: array index out of range in mfkeys.log (thanks to @TomHarkness) --- client/scripts/mfkeys.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/scripts/mfkeys.lua b/client/scripts/mfkeys.lua index 671ce03d..e8abd0b9 100644 --- a/client/scripts/mfkeys.lua +++ b/client/scripts/mfkeys.lua @@ -68,7 +68,7 @@ function checkBlock(blockNo, keys, keyType) data = data} local status = checkCommand(command) if status then return status, blockNo end - start = start+n+1 + start = start + n remaining = remaining - n end return nil