summaryrefslogtreecommitdiffstats
path: root/mtdutils
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2016-08-24 22:32:18 +0200
committerEthan Yonker <dees_troy@teamw.in>2016-08-24 22:32:18 +0200
commit34ae483e025c5b5c3293d6b6e78a623d40987fe8 (patch)
tree9995af67d6f045375ff6d2ca147bbaf1adea4ebc /mtdutils
parentminui: Fix gr_set_font() build issue on cm-13.0 tree. (diff)
parentmerge in nyc-release history after reset to nyc-dev (diff)
downloadandroid_bootable_recovery-34ae483e025c5b5c3293d6b6e78a623d40987fe8.tar
android_bootable_recovery-34ae483e025c5b5c3293d6b6e78a623d40987fe8.tar.gz
android_bootable_recovery-34ae483e025c5b5c3293d6b6e78a623d40987fe8.tar.bz2
android_bootable_recovery-34ae483e025c5b5c3293d6b6e78a623d40987fe8.tar.lz
android_bootable_recovery-34ae483e025c5b5c3293d6b6e78a623d40987fe8.tar.xz
android_bootable_recovery-34ae483e025c5b5c3293d6b6e78a623d40987fe8.tar.zst
android_bootable_recovery-34ae483e025c5b5c3293d6b6e78a623d40987fe8.zip
Diffstat (limited to 'mtdutils')
-rw-r--r--mtdutils/Android.mk3
-rw-r--r--mtdutils/mtdutils.c8
2 files changed, 6 insertions, 5 deletions
diff --git a/mtdutils/Android.mk b/mtdutils/Android.mk
index 2a380ae3d..7e5fadc71 100644
--- a/mtdutils/Android.mk
+++ b/mtdutils/Android.mk
@@ -14,7 +14,7 @@ endif
LOCAL_MODULE := libmtdutils
LOCAL_STATIC_LIBRARIES := libcutils libc
-LOCAL_FORCE_STATIC_EXECUTABLE := true
+LOCAL_CLANG := true
include $(BUILD_STATIC_LIBRARY)
@@ -31,6 +31,7 @@ endif
LOCAL_MODULE := libmtdutils
LOCAL_SHARED_LIBRARIES := libcutils libc
+LOCAL_CLANG := true
include $(BUILD_SHARED_LIBRARY)
diff --git a/mtdutils/mtdutils.c b/mtdutils/mtdutils.c
index 14be57f1e..6779d6e9a 100644
--- a/mtdutils/mtdutils.c
+++ b/mtdutils/mtdutils.c
@@ -297,20 +297,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!
}