fix naming convertion messes up
This commit is contained in:
1 parent
d3d4e72f2c
commit
0b01b060cf
2 files changed
+16
-7
No files matched your search
@@ -19,7 +19,7 @@
|
|||||||
* at power-off).
|
* at power-off).
|
||||||
*
|
*
|
||||||
* Short-pressing the button again will stop sniffing, and at _this_ point
|
* Short-pressing the button again will stop sniffing, and at _this_ point
|
||||||
* append trace data from RAM to a file in flash (hf_14asniff.trc) and unmount.
|
* append trace data from RAM to a file in flash (hf_14asniff.trace) and unmount.
|
||||||
*
|
*
|
||||||
* Once the data is saved, standalone mode will exit.
|
* Once the data is saved, standalone mode will exit.
|
||||||
*
|
*
|
||||||
@@ -31,10 +31,10 @@
|
|||||||
*
|
*
|
||||||
* To retrieve trace data from flash:
|
* To retrieve trace data from flash:
|
||||||
*
|
*
|
||||||
* 1. mem spiffs dump -s hf_14asniff.trc -d trace.trc
|
* 1. mem spiffs dump -s hf_14asniff.trace -d hf_14asniff.trace
|
||||||
* Copies trace data file from flash to your PC.
|
* Copies trace data file from flash to your PC.
|
||||||
*
|
*
|
||||||
* 2. trace load trace.trc
|
* 2. trace load hf_14asniff.trace
|
||||||
* Loads trace data from a file into PC-side buffers.
|
* Loads trace data from a file into PC-side buffers.
|
||||||
*
|
*
|
||||||
* 3. For ISO14a: trace list -t 14a -1
|
* 3. For ISO14a: trace list -t 14a -1
|
||||||
@@ -66,13 +66,13 @@
|
|||||||
#include "ticks.h"
|
#include "ticks.h"
|
||||||
#include "BigBuf.h"
|
#include "BigBuf.h"
|
||||||
|
|
||||||
#define HF_14ASNIFF_LOGFILE "hf_14asniff.trc"
|
#define HF_14ASNIFF_LOGFILE "hf_14asniff.trace"
|
||||||
|
|
||||||
static void DownloadTraceInstructions(void) {
|
static void DownloadTraceInstructions(void) {
|
||||||
Dbprintf("");
|
Dbprintf("");
|
||||||
Dbprintf("To get the trace from flash and display it:");
|
Dbprintf("To get the trace from flash and display it:");
|
||||||
Dbprintf("1. mem spiffs dump -s "HF_14ASNIFF_LOGFILE" -d trace.trc");
|
Dbprintf("1. mem spiffs dump -s "HF_14ASNIFF_LOGFILE" -d hf_14asniff.trace");
|
||||||
Dbprintf("2. trace load -f trace.trc");
|
Dbprintf("2. trace load -f hf_14asniff.trace");
|
||||||
Dbprintf("3. trace list -t 14a -1");
|
Dbprintf("3. trace list -t 14a -1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -383,7 +383,16 @@ static int CmdFlashMemSpiFFSDump(const char *Cmd) {
|
|||||||
strncpy(fn, dest, dlen);
|
strncpy(fn, dest, dlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
saveFile(fn, ".bin", dump, len);
|
// set file extension
|
||||||
|
char *suffix = strchr(fn, '.');
|
||||||
|
if (suffix) {
|
||||||
|
int new_fn_len = strlen(fn) - strlen(suffix);
|
||||||
|
char *new_fn = (char *) calloc(new_fn_len, sizeof(char));
|
||||||
|
new_fn = strncpy(new_fn, fn, new_fn_len);
|
||||||
|
saveFile(fn, suffix, dump, len);
|
||||||
|
} else
|
||||||
|
saveFile(fn, ".bin", dump, len); // default
|
||||||
|
|
||||||
if (eml) {
|
if (eml) {
|
||||||
uint8_t eml_len = 16;
|
uint8_t eml_len = 16;
|
||||||
if (strstr(fn, "class") != NULL)
|
if (strstr(fn, "class") != NULL)
|
||||||
|
|||||||
Reference in new issue
Block a user