projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
verdin-imx8mm: automatic ram size detection
[platform/kernel/u-boot.git]
/
tools
/
image-host.c
diff --git
a/tools/image-host.c
b/tools/image-host.c
index
8886bef
..
e32cc64
100644
(file)
--- a/
tools/image-host.c
+++ b/
tools/image-host.c
@@
-293,8
+293,8
@@
static int fit_image_read_data(char *filename, unsigned char *data,
/* Check file size */
if (sbuf.st_size != expected_size) {
/* Check file size */
if (sbuf.st_size != expected_size) {
- printf("File %s don't have the expected size (size=%ld, expected=%d)\n",
- filename, sbuf.st_size, expected_size);
+ printf("File %s don't have the expected size (size=%l
l
d, expected=%d)\n",
+ filename,
(long long)
sbuf.st_size, expected_size);
goto err;
}
goto err;
}
@@
-308,8
+308,8
@@
static int fit_image_read_data(char *filename, unsigned char *data,
/* Check that we have read all the file */
if (n != sbuf.st_size) {
/* Check that we have read all the file */
if (n != sbuf.st_size) {
- printf("Can't read all file %s (read %zd bytes, expexted %ld)\n",
- filename, n, sbuf.st_size);
+ printf("Can't read all file %s (read %zd bytes, expexted %l
l
d)\n",
+ filename, n,
(long long)
sbuf.st_size);
goto err;
}
goto err;
}
@@
-335,14
+335,14
@@
static int get_random_data(void *data, int size)
ret = clock_gettime(CLOCK_MONOTONIC, &date);
if (ret < 0) {
printf("%s: clock_gettime has failed (err=%d, str=%s)\n",
ret = clock_gettime(CLOCK_MONOTONIC, &date);
if (ret < 0) {
printf("%s: clock_gettime has failed (err=%d, str=%s)\n",
- __func__, ret, strerror(
ret
));
+ __func__, ret, strerror(
errno
));
goto out;
}
goto out;
}
- srand(date.tv_nsec);
+ srand
om
(date.tv_nsec);
for (i = 0; i < size; i++) {
for (i = 0; i < size; i++) {
- *tmp = rand() & 0xff;
+ *tmp = rand
om
() & 0xff;
tmp++;
}
tmp++;
}