diff options
author | Mark Salyzyn | 2014-03-13 18:38:43 -0500 |
---|---|---|
committer | Mark Salyzyn | 2014-03-13 19:46:53 -0500 |
commit | 1874e6557cbaf36e6893e502d4cdd7c645444b8f (patch) | |
tree | 5aced1e4f7ef6a9ce8d2b65657816631bd99f717 /libdiskconfig | |
parent | 1a3798996b710370091419fd30b954bec5127e29 (diff) | |
download | platform-system-core-1874e6557cbaf36e6893e502d4cdd7c645444b8f.tar.gz platform-system-core-1874e6557cbaf36e6893e502d4cdd7c645444b8f.tar.xz platform-system-core-1874e6557cbaf36e6893e502d4cdd7c645444b8f.zip |
libdiskconfig: 64-bit issues
Change-Id: Ie5e790c36395ec2f844294b91241a8f8ba3834b8
Diffstat (limited to 'libdiskconfig')
-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 6fd81b714..1167d4b5e 100644 --- a/libdiskconfig/diskconfig.c +++ b/libdiskconfig/diskconfig.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <linux/fs.h> | 30 | #include <linux/fs.h> |
31 | 31 | ||
32 | #include <cutils/config_utils.h> | 32 | #include <cutils/config_utils.h> |
33 | #include <cutils/log.h> | 33 | #include <log/log.h> |
34 | 34 | ||
35 | #include <diskconfig/diskconfig.h> | 35 | #include <diskconfig/diskconfig.h> |
36 | 36 | ||
@@ -337,7 +337,7 @@ validate(struct disk_info *dinfo) | |||
337 | } | 337 | } |
338 | 338 | ||
339 | #if 1 | 339 | #if 1 |
340 | ALOGV("Device/file %s: size=%llu bytes, num_lba=%u, sect_size=%d", | 340 | ALOGV("Device/file %s: size=%" PRIu64 " bytes, num_lba=%u, sect_size=%d", |
341 | dinfo->device, disk_size, dinfo->num_lba, dinfo->sect_size); | 341 | dinfo->device, disk_size, dinfo->num_lba, dinfo->sect_size); |
342 | #endif | 342 | #endif |
343 | 343 | ||
diff --git a/libdiskconfig/diskutils.c b/libdiskconfig/diskutils.c index e32573543..76596329f 100644 --- a/libdiskconfig/diskutils.c +++ b/libdiskconfig/diskutils.c | |||
@@ -19,13 +19,14 @@ | |||
19 | 19 | ||
20 | #include <errno.h> | 20 | #include <errno.h> |
21 | #include <fcntl.h> | 21 | #include <fcntl.h> |
22 | #include <inttypes.h> | ||
22 | #include <stdio.h> | 23 | #include <stdio.h> |
23 | #include <stdlib.h> | 24 | #include <stdlib.h> |
24 | #include <string.h> | 25 | #include <string.h> |
25 | #include <unistd.h> | 26 | #include <unistd.h> |
26 | #include <sys/stat.h> | 27 | #include <sys/stat.h> |
27 | 28 | ||
28 | #include <cutils/log.h> | 29 | #include <log/log.h> |
29 | 30 | ||
30 | #include <diskconfig/diskconfig.h> | 31 | #include <diskconfig/diskconfig.h> |
31 | 32 | ||
@@ -35,8 +36,8 @@ write_raw_image(const char *dst, const char *src, loff_t offset, int test) | |||
35 | int dst_fd = -1; | 36 | int dst_fd = -1; |
36 | int src_fd = -1; | 37 | int src_fd = -1; |
37 | uint8_t buffer[2048]; | 38 | uint8_t buffer[2048]; |
38 | int nr_bytes; | 39 | ssize_t nr_bytes; |
39 | int tmp; | 40 | ssize_t tmp; |
40 | int done = 0; | 41 | int done = 0; |
41 | uint64_t total = 0; | 42 | uint64_t total = 0; |
42 | 43 | ||
@@ -101,7 +102,7 @@ write_raw_image(const char *dst, const char *src, loff_t offset, int test) | |||
101 | if (dst_fd >= 0) | 102 | if (dst_fd >= 0) |
102 | fsync(dst_fd); | 103 | fsync(dst_fd); |
103 | 104 | ||
104 | ALOGI("Wrote %llu bytes to %s @ %lld", total, dst, offset); | 105 | ALOGI("Wrote %" PRIu64 " bytes to %s @ %lld", total, dst, offset); |
105 | 106 | ||
106 | close(src_fd); | 107 | close(src_fd); |
107 | if (dst_fd >= 0) | 108 | if (dst_fd >= 0) |