summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xutils/jz4740_usbtool/jz4740_usbtool.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/jz4740_usbtool/jz4740_usbtool.c b/utils/jz4740_usbtool/jz4740_usbtool.c
index 908cf72..84ffbf7 100755
--- a/utils/jz4740_usbtool/jz4740_usbtool.c
+++ b/utils/jz4740_usbtool/jz4740_usbtool.c
@@ -349,7 +349,8 @@ found:
int filesize(FILE* fd)
{
int tmp;
- tmp = fseek(fd, 0, SEEK_END);
+ fseek(fd, 0, SEEK_END);
+ tmp = ftell(fd);
fseek(fd, 0, SEEK_SET);
return tmp;
}
@@ -427,6 +428,8 @@ int main(int argc, char* argv[])
}
fclose(fd);
+ fprintf(stderr, "[INFO] File size: %d bytes\n", n);
+
jzconnect(address, buf, len, 1);
break;
case 2: