aboutsummaryrefslogtreecommitdiffstats
path: root/bmlutils
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2011-05-29 19:33:42 -0700
committerKoushik Dutta <koushd@gmail.com>2011-05-29 19:33:42 -0700
commit195e06be59d1868b00544634da673a0eae3b103e (patch)
tree61070bdad3a5245913a6597cebb48de61da0ea74 /bmlutils
parentcf5195aa79c4cf75056bdd873e6ba6b7bd6ca36a (diff)
downloadbootable_recovery-195e06be59d1868b00544634da673a0eae3b103e.zip
bootable_recovery-195e06be59d1868b00544634da673a0eae3b103e.tar.gz
bootable_recovery-195e06be59d1868b00544634da673a0eae3b103e.tar.bz2
allow flashing only bml8 if explicitly specified.
Change-Id: Ie0d282105413b3a448436c9ee69206718e924754
Diffstat (limited to 'bmlutils')
-rw-r--r--bmlutils/bmlutils.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/bmlutils/bmlutils.c b/bmlutils/bmlutils.c
index 9f8ee2f..d81cf11 100644
--- a/bmlutils/bmlutils.c
+++ b/bmlutils/bmlutils.c
@@ -61,13 +61,17 @@ int cmd_bml_restore_raw_partition(const char *partition, const char *filename)
if (strcmp(partition, "boot") != 0 && strcmp(partition, "recovery") != 0)
return 6;
- // always restore boot, regardless of whether recovery or boot is flashed.
- // this is because boot and recovery are the same on some samsung phones.
- int ret = restore_internal("/dev/block/bml7", filename);
- if (ret != 0)
- return ret;
+ int ret = -1;
+ if (strcmp(partition, "recoveryonly") != 0) {
+ // always restore boot, regardless of whether recovery or boot is flashed.
+ // this is because boot and recovery are the same on some samsung phones.
+ // unless of course, recoveryonly is explictly chosen (bml8)
+ ret = restore_internal("/dev/block/bml7", filename);
+ if (ret != 0)
+ return ret;
+ }
- if (strcmp(partition, "recovery") == 0)
+ if (strcmp(partition, "recovery") == 0 || strcmp(partition, "recoveryonly") == 0)
ret = restore_internal("/dev/block/bml8", filename);
return ret;
}