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); } 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