summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskconfig')
-rw-r--r--libdiskconfig/diskutils.c6
-rw-r--r--libdiskconfig/write_lst.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/libdiskconfig/diskutils.c b/libdiskconfig/diskutils.c
index 76596329f..5d0ee6267 100644
--- a/libdiskconfig/diskutils.c
+++ b/libdiskconfig/diskutils.c
@@ -41,7 +41,7 @@ write_raw_image(const char *dst, const char *src, loff_t offset, int test)
41 int done = 0; 41 int done = 0;
42 uint64_t total = 0; 42 uint64_t total = 0;
43 43
44 ALOGI("Writing RAW image '%s' to '%s' (offset=%llu)", src, dst, offset); 44 ALOGI("Writing RAW image '%s' to '%s' (offset=%llu)", src, dst, (unsigned long long)offset);
45 if ((src_fd = open(src, O_RDONLY)) < 0) { 45 if ((src_fd = open(src, O_RDONLY)) < 0) {
46 ALOGE("Could not open %s for reading (errno=%d).", src, errno); 46 ALOGE("Could not open %s for reading (errno=%d).", src, errno);
47 goto fail; 47 goto fail;
@@ -54,7 +54,7 @@ write_raw_image(const char *dst, const char *src, loff_t offset, int test)
54 } 54 }
55 55
56 if (lseek64(dst_fd, offset, SEEK_SET) != offset) { 56 if (lseek64(dst_fd, offset, SEEK_SET) != offset) {
57 ALOGE("Could not seek to offset %lld in %s.", offset, dst); 57 ALOGE("Could not seek to offset %lld in %s.", (long long)offset, dst);
58 goto fail; 58 goto fail;
59 } 59 }
60 } 60 }
@@ -102,7 +102,7 @@ write_raw_image(const char *dst, const char *src, loff_t offset, int test)
102 if (dst_fd >= 0) 102 if (dst_fd >= 0)
103 fsync(dst_fd); 103 fsync(dst_fd);
104 104
105 ALOGI("Wrote %" PRIu64 " bytes to %s @ %lld", total, dst, offset); 105 ALOGI("Wrote %" PRIu64 " bytes to %s @ %lld", total, dst, (long long)offset);
106 106
107 close(src_fd); 107 close(src_fd);
108 if (dst_fd >= 0) 108 if (dst_fd >= 0)
diff --git a/libdiskconfig/write_lst.c b/libdiskconfig/write_lst.c
index 826ef7a3c..90b1c829a 100644
--- a/libdiskconfig/write_lst.c
+++ b/libdiskconfig/write_lst.c
@@ -71,18 +71,18 @@ wlist_commit(int fd, struct write_list *lst, int test)
71{ 71{
72 for(; lst; lst = lst->next) { 72 for(; lst; lst = lst->next) {
73 if (lseek64(fd, lst->offset, SEEK_SET) != (loff_t)lst->offset) { 73 if (lseek64(fd, lst->offset, SEEK_SET) != (loff_t)lst->offset) {
74 ALOGE("Cannot seek to the specified position (%lld).", lst->offset); 74 ALOGE("Cannot seek to the specified position (%lld).", (long long)lst->offset);
75 goto fail; 75 goto fail;
76 } 76 }
77 77
78 if (!test) { 78 if (!test) {
79 if (write(fd, lst->data, lst->len) != (int)lst->len) { 79 if (write(fd, lst->data, lst->len) != (int)lst->len) {
80 ALOGE("Failed writing %u bytes at position %lld.", lst->len, 80 ALOGE("Failed writing %u bytes at position %lld.", lst->len,
81 lst->offset); 81 (long long)lst->offset);
82 goto fail; 82 goto fail;
83 } 83 }
84 } else 84 } else
85 ALOGI("Would write %d bytes @ offset %lld.", lst->len, lst->offset); 85 ALOGI("Would write %d bytes @ offset %lld.", lst->len, (long long)lst->offset);
86 } 86 }
87 87
88 return 0; 88 return 0;