]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/flasher.c
(dirty) fix for linux to clean up the /dev/ttyACM* quicker
[proxmark3-svn] / client / flasher.c
index d494810aa5b64ca9a476c047dc19727dcb5c2ba2..d1efec5eebdba4f1f77fa060812ad1e136adf76e 100644 (file)
 #include "uart.h"
 #include "usb_cmd.h"
 
+#ifdef _WIN32
+# define unlink(x)
+#endif
+
 static serial_port sp;
 static char* serial_port_name;
 
@@ -62,6 +66,8 @@ void ReceiveCommand(UsbCommand* rxcmd) {
 void CloseProxmark() {
   // Clean up the port
   uart_close(sp);
+  // Fix for linux, it seems that it is extremely slow to release the serial port file descriptor /dev/*
+  unlink(serial_port_name);
 }
 
 int OpenProxmark(size_t i) {
Impressum, Datenschutz