]> cvs.zerfleddert.de Git - proxmark3-svn/blobdiff - client/loclass/fileutils.c
ADD: added a compiling flag -DHAS_512_FLASH i common/Makefile.common, to be used...
[proxmark3-svn] / client / loclass / fileutils.c
index 8ec52cfeb8d4da51c86797362dc473cf1df4f128..e5e5c5b0569270c422c53e83078d738a64f9e106 100644 (file)
@@ -35,6 +35,7 @@
  * 
  * 
  ****************************************************************************/
+#ifndef ON_DEVICE
 
 #include <stdio.h>
 #include <string.h>
@@ -78,31 +79,18 @@ int saveFile(const char *preferredName, const char *suffix, const void* data, si
        /*Opening file for writing in binary mode*/
        FILE *fileHandle=fopen(fileName,"wb");
        if(!fileHandle) {
-               PrintAndLog("Failed to write to file '%s'", fileName);
+               prnlog("Failed to write to file '%s'", fileName);
                free(fileName);
                return 1;
        }
        fwrite(data, 1, datalen, fileHandle);
        fclose(fileHandle);
-       PrintAndLog("Saved data to '%s'", fileName);
+       prnlog("Saved data to '%s'", fileName);
        free(fileName);
 
        return 0;
 }
 
-int loadFile(const char *fileName, void* data, size_t datalen)
-{
-       FILE *filehandle = fopen(fileName, "rb");
-       if(!filehandle) {
-               PrintAndLog("Failed to read from file '%s'", fileName);
-               free(filehandle);
-               return 1;
-       }
-       fread(data,datalen,1,filehandle);
-       fclose(filehandle);
-       free(filehandle);
-       return 0;
-}
 /**
  * Utility function to print to console. This is used consistently within the library instead
  * of printf, but it actually only calls printf (and adds a linebreak).
@@ -121,3 +109,10 @@ void prnlog(char *fmt, ...)
        PrintAndLog(buffer);
 
 }
+#else //if we're on ARM
+void prnlog(char *fmt,...)
+{
+       return;
+}
+
+#endif
Impressum, Datenschutz