diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-03-14 01:03:31 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-03-14 01:03:31 +0000 |
commit | 6ab10a1c17d048e88f929d35293d266b6480f6d6 (patch) | |
tree | 5aced1e4f7ef6a9ce8d2b65657816631bd99f717 | |
parent | 1a3798996b710370091419fd30b954bec5127e29 (diff) | |
parent | 1874e6557cbaf36e6893e502d4cdd7c645444b8f (diff) | |
download | system_core-6ab10a1c17d048e88f929d35293d266b6480f6d6.zip system_core-6ab10a1c17d048e88f929d35293d266b6480f6d6.tar.gz system_core-6ab10a1c17d048e88f929d35293d266b6480f6d6.tar.bz2 |
Merge "libdiskconfig: 64-bit issues"
-rw-r--r-- | libdiskconfig/diskconfig.c | 4 | ||||
-rw-r--r-- | libdiskconfig/diskutils.c | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/libdiskconfig/diskconfig.c b/libdiskconfig/diskconfig.c index 6fd81b7..1167d4b 100644 --- a/libdiskconfig/diskconfig.c +++ b/libdiskconfig/diskconfig.c @@ -30,7 +30,7 @@ #include <linux/fs.h> #include <cutils/config_utils.h> -#include <cutils/log.h> +#include <log/log.h> #include <diskconfig/diskconfig.h> @@ -337,7 +337,7 @@ validate(struct disk_info *dinfo) } #if 1 - ALOGV("Device/file %s: size=%llu bytes, num_lba=%u, sect_size=%d", + ALOGV("Device/file %s: size=%" PRIu64 " bytes, num_lba=%u, sect_size=%d", dinfo->device, disk_size, dinfo->num_lba, dinfo->sect_size); #endif diff --git a/libdiskconfig/diskutils.c b/libdiskconfig/diskutils.c index e325735..7659632 100644 --- a/libdiskconfig/diskutils.c +++ b/libdiskconfig/diskutils.c @@ -19,13 +19,14 @@ #include <errno.h> #include <fcntl.h> +#include <inttypes.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/stat.h> -#include <cutils/log.h> +#include <log/log.h> #include <diskconfig/diskconfig.h> @@ -35,8 +36,8 @@ write_raw_image(const char *dst, const char *src, loff_t offset, int test) int dst_fd = -1; int src_fd = -1; uint8_t buffer[2048]; - int nr_bytes; - int tmp; + ssize_t nr_bytes; + ssize_t tmp; int done = 0; uint64_t total = 0; @@ -101,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 %llu bytes to %s @ %lld", total, dst, offset); + ALOGI("Wrote %" PRIu64 " bytes to %s @ %lld", total, dst, offset); close(src_fd); if (dst_fd >= 0) |