summaryrefslogtreecommitdiffstats
path: root/utils/rk27utils/rk27load/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/rk27utils/rk27load/common.c')
-rw-r--r--utils/rk27utils/rk27load/common.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/utils/rk27utils/rk27load/common.c b/utils/rk27utils/rk27load/common.c
new file mode 100644
index 0000000000..b97cfbcd79
--- /dev/null
+++ b/utils/rk27utils/rk27load/common.c
@@ -0,0 +1,16 @@
+#include <stdint.h>
+#include <stdio.h>
+
+#include "common.h"
+
+uint32_t filesize(FILE * f)
+{
+ uint32_t filesize;
+
+ fseek(f, 0, SEEK_END);
+ filesize = ftell(f);
+ fseek(f, 0, SEEK_SET);
+
+ return filesize;
+}
+