projects
/
proxmark3-svn
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
FIX: decrease 2^39 -> 2^38. its a big searchspace anyway.
[proxmark3-svn]
/
client
/
loclass
/
fileutils.c
diff --git
a/client/loclass/fileutils.c
b/client/loclass/fileutils.c
index 4079dccf80d5b9979f01a25e49d96c0d809be160..fd18b96421f50b8b43185e9d3d3b1308b735154c 100644
(file)
--- a/
client/loclass/fileutils.c
+++ b/
client/loclass/fileutils.c
@@
-35,6
+35,7
@@
*
*
****************************************************************************/
*
*
****************************************************************************/
+#ifndef ON_DEVICE
#include <stdio.h>
#include <string.h>
#include <stdio.h>
#include <string.h>
@@
-76,17
+77,19
@@
int saveFile(const char *preferredName, const char *suffix, const void* data, si
/* We should have a valid filename now, e.g. dumpdata-3.bin */
/*Opening file for writing in binary mode*/
/* We should have a valid filename now, e.g. dumpdata-3.bin */
/*Opening file for writing in binary mode*/
- FILE *f
ileHandle=
fopen(fileName,"wb");
- if
(!fileHandle
) {
+ FILE *f
=
fopen(fileName,"wb");
+ if
(!f
) {
prnlog("Failed to write to file '%s'", fileName);
free(fileName);
return 1;
}
prnlog("Failed to write to file '%s'", fileName);
free(fileName);
return 1;
}
- fwrite(data, 1, datalen, fileHandle);
- fclose(fileHandle);
+ fwrite(data, 1, datalen, f);
+ if (f) {
+ fclose(f);
+ f = NULL;
+ }
prnlog("Saved data to '%s'", fileName);
free(fileName);
prnlog("Saved data to '%s'", fileName);
free(fileName);
-
return 0;
}
return 0;
}
@@
-108,3
+111,10
@@
void prnlog(char *fmt, ...)
PrintAndLog(buffer);
}
PrintAndLog(buffer);
}
+#else //if we're on ARM
+void prnlog(char *fmt,...)
+{
+ return;
+}
+
+#endif
Impressum
,
Datenschutz