summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2014-05-06 18:43:27 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-06 18:43:27 +0000
commit27e3913b7c95aa15061368f50aada7b6b7c71eb2 (patch)
treed6bfbb8a9804600d84c6455d0e9a906239cbda74
parent6d9ae28ed4ea917e3c6db12228b2b06d02489c11 (diff)
parent52dd7cc0bddbe6092f818827efd584466234d67b (diff)
downloadsystem_core-27e3913b7c95aa15061368f50aada7b6b7c71eb2.zip
system_core-27e3913b7c95aa15061368f50aada7b6b7c71eb2.tar.gz
system_core-27e3913b7c95aa15061368f50aada7b6b7c71eb2.tar.bz2
am 52dd7cc0: Merge "Fix 64-bit host build."
* commit '52dd7cc0bddbe6092f818827efd584466234d67b': Fix 64-bit host build.
-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 7659632..5d0ee62 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)
int done = 0;
uint64_t total = 0;
- ALOGI("Writing RAW image '%s' to '%s' (offset=%llu)", src, dst, offset);
+ ALOGI("Writing RAW image '%s' to '%s' (offset=%llu)", src, dst, (unsigned long long)offset);
if ((src_fd = open(src, O_RDONLY)) < 0) {
ALOGE("Could not open %s for reading (errno=%d).", src, errno);
goto fail;
@@ -54,7 +54,7 @@ write_raw_image(const char *dst, const char *src, loff_t offset, int test)
}
if (lseek64(dst_fd, offset, SEEK_SET) != offset) {
- ALOGE("Could not seek to offset %lld in %s.", offset, dst);
+ ALOGE("Could not seek to offset %lld in %s.", (long long)offset, dst);
goto fail;
}
}
@@ -102,7 +102,7 @@ write_raw_image(const char *dst, const char *src, loff_t offset, int test)
if (dst_fd >= 0)
fsync(dst_fd);
- ALOGI("Wrote %" PRIu64 " bytes to %s @ %lld", total, dst, offset);
+ ALOGI("Wrote %" PRIu64 " bytes to %s @ %lld", total, dst, (long long)offset);
close(src_fd);
if (dst_fd >= 0)
diff --git a/libdiskconfig/write_lst.c b/libdiskconfig/write_lst.c
index 826ef7a..90b1c82 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)
{
for(; lst; lst = lst->next) {
if (lseek64(fd, lst->offset, SEEK_SET) != (loff_t)lst->offset) {
- ALOGE("Cannot seek to the specified position (%lld).", lst->offset);
+ ALOGE("Cannot seek to the specified position (%lld).", (long long)lst->offset);
goto fail;
}
if (!test) {
if (write(fd, lst->data, lst->len) != (int)lst->len) {
ALOGE("Failed writing %u bytes at position %lld.", lst->len,
- lst->offset);
+ (long long)lst->offset);
goto fail;
}
} else
- ALOGI("Would write %d bytes @ offset %lld.", lst->len, lst->offset);
+ ALOGI("Would write %d bytes @ offset %lld.", lst->len, (long long)lst->offset);
}
return 0;