summaryrefslogtreecommitdiff
path: root/lib/libmtd.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libmtd.c')
-rw-r--r--lib/libmtd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libmtd.c b/lib/libmtd.c
index c4836df..654490e 100644
--- a/lib/libmtd.c
+++ b/lib/libmtd.c
@@ -1063,8 +1063,8 @@ int mtd_read(const struct mtd_dev_info *mtd, int fd, int eb, int offs,
/* Seek to the beginning of the eraseblock */
seek = (off_t)eb * mtd->eb_size + offs;
if (lseek(fd, seek, SEEK_SET) != seek)
- return sys_errmsg("cannot seek mtd%d to offset %llu",
- mtd->mtd_num, (unsigned long long)seek);
+ return sys_errmsg("cannot seek mtd%d to offset %"PRIdoff_t,
+ mtd->mtd_num, seek);
while (rd < len) {
ret = read(fd, buf, len);
@@ -1171,8 +1171,8 @@ int mtd_write(libmtd_t desc, const struct mtd_dev_info *mtd, int fd, int eb,
if (data) {
/* Seek to the beginning of the eraseblock */
if (lseek(fd, seek, SEEK_SET) != seek)
- return sys_errmsg("cannot seek mtd%d to offset %llu",
- mtd->mtd_num, (unsigned long long)seek);
+ return sys_errmsg("cannot seek mtd%d to offset %"PRIdoff_t,
+ mtd->mtd_num, seek);
ret = write(fd, data, len);
if (ret != len)
return sys_errmsg("cannot write %d bytes to mtd%d "
@@ -1329,8 +1329,8 @@ int mtd_write_img(const struct mtd_dev_info *mtd, int fd, int eb, int offs,
/* Seek to the beginning of the eraseblock */
seek = (off_t)eb * mtd->eb_size + offs;
if (lseek(fd, seek, SEEK_SET) != seek) {
- sys_errmsg("cannot seek mtd%d to offset %llu",
- mtd->mtd_num, (unsigned long long)seek);
+ sys_errmsg("cannot seek mtd%d to offset %"PRIdoff_t,
+ mtd->mtd_num, seek);
goto out_close;
}