fix wimax backup for emmc
Change-Id: I3da8a3d9411b52e07bebe6214f86dd12ac98bb82
This commit is contained in:
parent
5ee98b20d0
commit
59d86b4cf7
@ -26,7 +26,7 @@ LOCAL_MODULE := recovery
|
||||
|
||||
LOCAL_FORCE_STATIC_EXECUTABLE := true
|
||||
|
||||
RECOVERY_VERSION := ClockworkMod Recovery v3.0.1.3
|
||||
RECOVERY_VERSION := ClockworkMod Recovery v3.0.1.4
|
||||
LOCAL_CFLAGS += -DRECOVERY_VERSION="$(RECOVERY_VERSION)"
|
||||
RECOVERY_API_VERSION := 2
|
||||
LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION)
|
||||
|
@ -464,9 +464,8 @@ ERROR3:
|
||||
}
|
||||
|
||||
|
||||
// TODO: refactor this to not be a giant copy paste mess
|
||||
int
|
||||
mmc_raw_dump (const MmcPartition *partition, char *out_file) {
|
||||
mmc_raw_dump_internal (const char* in_file, const char *out_file) {
|
||||
int ch;
|
||||
FILE *in;
|
||||
FILE *out;
|
||||
@ -475,7 +474,6 @@ mmc_raw_dump (const MmcPartition *partition, char *out_file) {
|
||||
unsigned sz = 0;
|
||||
unsigned i;
|
||||
int ret = -1;
|
||||
char *in_file = partition->device_index;
|
||||
|
||||
in = fopen ( in_file, "r" );
|
||||
if (in == NULL)
|
||||
@ -516,6 +514,12 @@ ERROR3:
|
||||
|
||||
}
|
||||
|
||||
// TODO: refactor this to not be a giant copy paste mess
|
||||
int
|
||||
mmc_raw_dump (const MmcPartition *partition, char *out_file) {
|
||||
return mmc_raw_dump_internal(partition->device_index, out_file);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
mmc_raw_read (const MmcPartition *partition, char *data, int data_size) {
|
||||
@ -586,11 +590,16 @@ int cmd_mmc_restore_raw_partition(const char *partition, const char *filename)
|
||||
int cmd_mmc_backup_raw_partition(const char *partition, const char *filename)
|
||||
{
|
||||
mmc_scan_partitions();
|
||||
const MmcPartition *p;
|
||||
p = mmc_find_partition_by_name(partition);
|
||||
if (p == NULL)
|
||||
return -1;
|
||||
return mmc_raw_dump(p, filename);
|
||||
if (partition[0] != '/') {
|
||||
const MmcPartition *p;
|
||||
p = mmc_find_partition_by_name(partition);
|
||||
if (p == NULL)
|
||||
return -1;
|
||||
return mmc_raw_dump(p, filename);
|
||||
}
|
||||
else {
|
||||
return mmc_raw_dump_internal(partition, filename);
|
||||
}
|
||||
}
|
||||
|
||||
int cmd_mmc_erase_raw_partition(const char *partition)
|
||||
|
Loading…
Reference in New Issue
Block a user