summaryrefslogtreecommitdiffstats
path: root/fastbootd/commands/partitions.c
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-01-14 16:17:08 -0800
committerElliott Hughes <enh@google.com>2014-01-14 16:17:08 -0800
commit4f24125ccc7748bb971b686f4c1b18c6f4a5e4ac (patch)
tree9a6ac4c75ca8a6a83956027e52befd57bd413ad0 /fastbootd/commands/partitions.c
parentaead003c8bc677218329c535b063a5bb66695414 (diff)
downloadsystem_core-4f24125ccc7748bb971b686f4c1b18c6f4a5e4ac.zip
system_core-4f24125ccc7748bb971b686f4c1b18c6f4a5e4ac.tar.gz
system_core-4f24125ccc7748bb971b686f4c1b18c6f4a5e4ac.tar.bz2
Fix fastbootd build for 64-bit.
Change-Id: I04bef46f0125fd6a8fc0cb966bd257ad594aff1e
Diffstat (limited to 'fastbootd/commands/partitions.c')
-rw-r--r--fastbootd/commands/partitions.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fastbootd/commands/partitions.c b/fastbootd/commands/partitions.c
index de80ea3..74232e6 100644
--- a/fastbootd/commands/partitions.c
+++ b/fastbootd/commands/partitions.c
@@ -42,6 +42,7 @@
#include <sys/ioctl.h>
#include <stdlib.h>
#include <cutils/config_utils.h>
+#include <inttypes.h>
#include "partitions.h"
#include "debug.h"
@@ -80,7 +81,7 @@ int gpt_mmap(struct GPT_mapping *mapping, uint64_t location, int size, int fd)
uint64_t sz = get_file_size64(fd);
if (sz < size + location) {
- D(ERR, "the location of mapping area is outside of the device size %lld", sz);
+ D(ERR, "the location of mapping area is outside of the device size %" PRId64, sz);
return 1;
}
location = ALIGN_DOWN(location, PAGE_SIZE);
@@ -89,7 +90,7 @@ int gpt_mmap(struct GPT_mapping *mapping, uint64_t location, int size, int fd)
if (mapping->map_ptr == MAP_FAILED) {
mapping->ptr = MAP_FAILED;
- D(ERR, "map failed %d", (int) mapping->map_ptr);
+ D(ERR, "map failed: %s", strerror(errno));
return 1;
}