summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYing Wang2014-04-23 20:28:14 -0500
committerYing Wang2014-05-06 13:39:31 -0500
commit34030101863575aaa14e318ff0a9d9462803e736 (patch)
tree5b26a7d1b2f1559f7bbf9c2959b55ae201bb34ff /libdiskconfig
parent8e26b2522267658ef996631a3a43818c1baf6fc3 (diff)
downloadplatform-system-core-34030101863575aaa14e318ff0a9d9462803e736.tar.gz
platform-system-core-34030101863575aaa14e318ff0a9d9462803e736.tar.xz
platform-system-core-34030101863575aaa14e318ff0a9d9462803e736.zip
Fix 64-bit host build.
Bug: 13751317 Change-Id: I8ba4fc9918fba0975eb61ec37a8a16b02acfa864
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;