]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/util.c
also delete *.bin and fpga_compressor when "make clean".
[proxmark3-svn] / armsrc / util.c
index 674f1b91f5ef76d129fa3b200eeb0605ef49b364..8576ddce5fcb7c641236d214bb224ca3221769b1 100644 (file)
@@ -12,6 +12,7 @@
 #include "util.h"
 #include "string.h"
 #include "apps.h"
+#include "BigBuf.h"
 
 
 
@@ -34,7 +35,7 @@ void print_result(char *name, uint8_t *buf, size_t len) {
 }
 
 size_t nbytes(size_t nbits) {
-       return (nbits/8)+((nbits%8)>0);
+       return (nbits >> 3)+((nbits % 8) > 0);
 }
 
 uint32_t SwapBits(uint32_t value, int nrbits) {
@@ -267,15 +268,15 @@ void FormatVersionInformation(char *dst, int len, const char *prefix, void *vers
        dst[0] = 0;
        strncat(dst, prefix, len-1);
        if(v->magic != VERSION_INFORMATION_MAGIC) {
-               strncat(dst, "Missing/Invalid version information", len - strlen(dst) - 1);
+               strncat(dst, "Missing/Invalid version information\n", len - strlen(dst) - 1);
                return;
        }
        if(v->versionversion != 1) {
-               strncat(dst, "Version information not understood", len - strlen(dst) - 1);
+               strncat(dst, "Version information not understood\n", len - strlen(dst) - 1);
                return;
        }
        if(!v->present) {
-               strncat(dst, "Version information not available", len - strlen(dst) - 1);
+               strncat(dst, "Version information not available\n", len - strlen(dst) - 1);
                return;
        }
 
@@ -288,6 +289,7 @@ void FormatVersionInformation(char *dst, int len, const char *prefix, void *vers
 
        strncat(dst, " ", len - strlen(dst) - 1);
        strncat(dst, v->buildtime, len - strlen(dst) - 1);
+       strncat(dst, "\n", len - strlen(dst) - 1);
 }
 
 //  -------------------------------------------------------------------------
@@ -428,4 +430,3 @@ uint32_t RAMFUNC GetCountSspClk(){
        }
 }
 
-
Impressum, Datenschutz