allow flashing only bml8 if explicitly specified.

Change-Id: Ie0d282105413b3a448436c9ee69206718e924754
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 @@
     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;
 }