aboutsummaryrefslogtreecommitdiff
path: root/misc-utils
diff options
context:
space:
mode:
Diffstat (limited to 'misc-utils')
-rw-r--r--misc-utils/flash_erase.c6
-rw-r--r--misc-utils/flash_otp_write.c2
-rw-r--r--misc-utils/ftl_check.c2
-rw-r--r--misc-utils/mtd_debug.c4
-rw-r--r--misc-utils/serve_image.c4
5 files changed, 9 insertions, 9 deletions
diff --git a/misc-utils/flash_erase.c b/misc-utils/flash_erase.c
index e7a00ae..a7fc6a6 100644
--- a/misc-utils/flash_erase.c
+++ b/misc-utils/flash_erase.c
@@ -53,8 +53,8 @@ int target_endian = __BYTE_ORDER;
static void show_progress(struct mtd_dev_info *mtd, off_t start, int eb,
int eb_start, int eb_cnt)
{
- bareverbose(!quiet, "\rErasing %d Kibyte @ %"PRIxoff_t" -- %2i %% complete ",
- mtd->eb_size / 1024, start, ((eb - eb_start) * 100) / eb_cnt);
+ bareverbose(!quiet, "\rErasing %d Kibyte @ %llx -- %2i %% complete ",
+ mtd->eb_size / 1024, (unsigned long long)start, ((eb - eb_start) * 100) / eb_cnt);
fflush(stdout);
}
@@ -211,7 +211,7 @@ int main(int argc, char *argv[])
if (!noskipbad) {
int ret = mtd_is_bad(&mtd, fd, eb);
if (ret > 0) {
- verbose(!quiet, "Skipping bad block at %08"PRIxoff_t, offset);
+ verbose(!quiet, "Skipping bad block at %08llx", (unsigned long long)offset);
continue;
} else if (ret < 0) {
if (errno == EOPNOTSUPP) {
diff --git a/misc-utils/flash_otp_write.c b/misc-utils/flash_otp_write.c
index b02d0b0..04c96c6 100644
--- a/misc-utils/flash_otp_write.c
+++ b/misc-utils/flash_otp_write.c
@@ -76,7 +76,7 @@ int main(int argc,char *argv[])
return errno;
}
- printf("Writing OTP user data on %s at offset 0x%"PRIxoff_t"\n", argv[2], offset);
+ printf("Writing OTP user data on %s at offset 0x%llx\n", argv[2], (unsigned long long)offset);
if (mtd_type_is_nand_user(&mtdInfo))
len = mtdInfo.writesize;
diff --git a/misc-utils/ftl_check.c b/misc-utils/ftl_check.c
index a853cf4..e854922 100644
--- a/misc-utils/ftl_check.c
+++ b/misc-utils/ftl_check.c
@@ -131,7 +131,7 @@ static void check_partition(int fd)
perror("read failed");
break;
}
- printf("\nErase unit %"PRIdoff_t":\n", i);
+ printf("\nErase unit %lld:\n", (long long)i);
if ((hdr2.FormattedSize != hdr.FormattedSize) ||
(hdr2.NumEraseUnits != hdr.NumEraseUnits) ||
(hdr2.SerialNumber != hdr.SerialNumber))
diff --git a/misc-utils/mtd_debug.c b/misc-utils/mtd_debug.c
index ac37e23..d65ad36 100644
--- a/misc-utils/mtd_debug.c
+++ b/misc-utils/mtd_debug.c
@@ -160,7 +160,7 @@ retry:
if (buf != NULL)
free(buf);
close(outfd);
- printf("Copied %zu bytes from address 0x%.8"PRIxoff_t" in flash to %s\n", len, offset, filename);
+ printf("Copied %zu bytes from address 0x%.8llx in flash to %s\n", len, (unsigned long long)offset, filename);
return 0;
err2:
@@ -225,7 +225,7 @@ retry:
if (buf != NULL)
free(buf);
fclose(fp);
- printf("Copied %d bytes from %s to address 0x%.8"PRIxoff_t" in flash\n", len, filename, offset);
+ printf("Copied %d bytes from %s to address 0x%.8llx in flash\n", len, filename, (unsigned long long)offset);
return 0;
}
diff --git a/misc-utils/serve_image.c b/misc-utils/serve_image.c
index f2475d6..6c8c8fb 100644
--- a/misc-utils/serve_image.c
+++ b/misc-utils/serve_image.c
@@ -129,8 +129,8 @@ int main(int argc, char **argv)
}
if (st.st_size % erasesize) {
- fprintf(stderr, "Image size %" PRIdoff_t " bytes is not a multiple of erasesize %d bytes\n",
- st.st_size, erasesize);
+ fprintf(stderr, "Image size %lld bytes is not a multiple of erasesize %d bytes\n",
+ (long long)st.st_size, erasesize);
exit(1);
}
image = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, rfd, 0);