Merge AOSP android-9.0.0_r3
Fix conflicts and make it build in 5.1, 6.0, 7.1, 8.1, and 9.0
Change-Id: Ida0a64c29ff27d339b7f42a18d820930964ac6e4
diff --git a/mmcutils/mmcutils.h b/mmcutils/mmcutils.h
index 5b10fdc..4fece79 100644
--- a/mmcutils/mmcutils.h
+++ b/mmcutils/mmcutils.h
@@ -31,7 +31,9 @@
#define MMCUTILS_H_
/* Some useful define used to access the MBR/EBR table */
+#ifndef BLOCK_SIZE
#define BLOCK_SIZE 0x200
+#endif
#define TABLE_ENTRY_0 0x1BE
#define TABLE_ENTRY_1 0x1CE
#define TABLE_ENTRY_2 0x1DE
@@ -76,15 +78,15 @@
/* Functions */
int mmc_scan_partitions();
const MmcPartition *mmc_find_partition_by_name(const char *name);
-int mmc_format_ext3 (MmcPartition *partition);
+int mmc_format_ext3 (const MmcPartition *partition);
int mmc_mount_partition(const MmcPartition *partition, const char *mount_point, \
int read_only);
-int mmc_raw_copy (const MmcPartition *partition, char *in_file);
+int mmc_raw_copy (const MmcPartition *partition, const char *in_file);
int mmc_raw_read (const MmcPartition *partition, char *data, int data_size);
int mmc_raw_write (const MmcPartition *partition, char *data, int data_size);
-int format_ext2_device(const char *device);
-int format_ext3_device(const char *device);
+int format_ext2_device(char *device);
+int format_ext3_device(char *device);
#endif // MMCUTILS_H_