summaryrefslogtreecommitdiffstats
path: root/mtdutils
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2015-09-25 20:39:26 +0200
committerAndroid Git Automerger <android-git-automerger@android.com>2015-09-25 20:39:26 +0200
commitd715674899b9026ce5f5c653dc218fc7b67f9c7b (patch)
tree6459294e7b0ef88b3d4a45582d2687ccf1d81f03 /mtdutils
parentam f7319f4d: am 3317d501: Merge "minadbd: move from D() to VLOG()." (diff)
parentam 2bdac629: Merge changes Ic769eafc,I63f28b3b (diff)
downloadandroid_bootable_recovery-d715674899b9026ce5f5c653dc218fc7b67f9c7b.tar
android_bootable_recovery-d715674899b9026ce5f5c653dc218fc7b67f9c7b.tar.gz
android_bootable_recovery-d715674899b9026ce5f5c653dc218fc7b67f9c7b.tar.bz2
android_bootable_recovery-d715674899b9026ce5f5c653dc218fc7b67f9c7b.tar.lz
android_bootable_recovery-d715674899b9026ce5f5c653dc218fc7b67f9c7b.tar.xz
android_bootable_recovery-d715674899b9026ce5f5c653dc218fc7b67f9c7b.tar.zst
android_bootable_recovery-d715674899b9026ce5f5c653dc218fc7b67f9c7b.zip
Diffstat (limited to 'mtdutils')
-rw-r--r--mtdutils/mtdutils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mtdutils/mtdutils.c b/mtdutils/mtdutils.c
index cc3033444..cd4f52cd5 100644
--- a/mtdutils/mtdutils.c
+++ b/mtdutils/mtdutils.c
@@ -300,20 +300,20 @@ static int read_block(const MtdPartition *partition, int fd, char *data)
if (TEMP_FAILURE_RETRY(lseek64(fd, pos, SEEK_SET)) != pos ||
TEMP_FAILURE_RETRY(read(fd, data, size)) != size) {
printf("mtd: read error at 0x%08llx (%s)\n",
- pos, strerror(errno));
+ (long long)pos, strerror(errno));
} else if (ioctl(fd, ECCGETSTATS, &after)) {
printf("mtd: ECCGETSTATS error (%s)\n", strerror(errno));
return -1;
} else if (after.failed != before.failed) {
printf("mtd: ECC errors (%d soft, %d hard) at 0x%08llx\n",
- after.corrected - before.corrected,
- after.failed - before.failed, pos);
+ after.corrected - before.corrected,
+ after.failed - before.failed, (long long)pos);
// copy the comparison baseline for the next read.
memcpy(&before, &after, sizeof(struct mtd_ecc_stats));
} else if ((mgbb = ioctl(fd, MEMGETBADBLOCK, &pos))) {
fprintf(stderr,
"mtd: MEMGETBADBLOCK returned %d at 0x%08llx: %s\n",
- mgbb, pos, strerror(errno));
+ mgbb, (long long)pos, strerror(errno));
} else {
return 0; // Success!
}