summaryrefslogtreecommitdiffstats
path: root/fastbootd/commands/partitions.c
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-01-15 00:36:28 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-01-15 00:36:28 +0000
commitb6e70fce5365c596a7b0b22cd3ba75c5d7ef6430 (patch)
treed55a349de4d618686312fa18fdc99974a8b282b5 /fastbootd/commands/partitions.c
parentaf16bf4f5160c03c858b32c40900f07f1e9c0366 (diff)
parent57f226256659eca3cf06233d74761ca9c37d51b2 (diff)
downloadsystem_core-b6e70fce5365c596a7b0b22cd3ba75c5d7ef6430.zip
system_core-b6e70fce5365c596a7b0b22cd3ba75c5d7ef6430.tar.gz
system_core-b6e70fce5365c596a7b0b22cd3ba75c5d7ef6430.tar.bz2
am 57f22625: am ea8dcdcf: am 21ecc30c: Merge "Fix fastbootd build for 64-bit."
* commit '57f226256659eca3cf06233d74761ca9c37d51b2': Fix fastbootd build for 64-bit.
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;
}