From e87f9e695e041a2ad547de98e317a35332dc1c9e Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Tue, 12 Jul 2011 18:07:45 -0700 Subject: [PATCH] support explicitly provided device paths Change-Id: I1ddb862f62932d2e1525d8b317613bf67a64093e --- bmlutils/bmlutils.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bmlutils/bmlutils.c b/bmlutils/bmlutils.c index db80501..dad3975 100644 --- a/bmlutils/bmlutils.c +++ b/bmlutils/bmlutils.c @@ -80,6 +80,10 @@ int cmd_bml_restore_raw_partition(const char *partition, const char *filename) if (strcmp(partition, "recovery") == 0 || strcmp(partition, "recoveryonly") == 0) ret = restore_internal(BOARD_BML_RECOVERY, filename); + + // support explicitly provided device paths + if (partition[0] == '/') + ret = restore_internal(partition, filename); return ret; } @@ -90,6 +94,10 @@ int cmd_bml_backup_raw_partition(const char *partition, const char *out_file) bml = BOARD_BML_BOOT; else if (strcmp("recovery", partition) == 0) bml = BOARD_BML_RECOVERY; + else if (partition[0] == '/') { + // support explicitly provided device paths + bml = partition; + } else { printf("Invalid partition.\n"); return -1;