summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bootloader_message/bootloader_message.cpp2
-rw-r--r--bootloader_message/include/bootloader_message/bootloader_message.h2
-rw-r--r--twrp.cpp6
3 files changed, 4 insertions, 6 deletions
diff --git a/bootloader_message/bootloader_message.cpp b/bootloader_message/bootloader_message.cpp
index 362d9cbe2..4d1ce5bb4 100644
--- a/bootloader_message/bootloader_message.cpp
+++ b/bootloader_message/bootloader_message.cpp
@@ -39,7 +39,7 @@
static std::string misc_blkdev;
-void set_misc_device(const char* type, const char* name) {
+void set_misc_device(std::string name) {
misc_blkdev = name;
}
diff --git a/bootloader_message/include/bootloader_message/bootloader_message.h b/bootloader_message/include/bootloader_message/bootloader_message.h
index b4d3604e7..52d733105 100644
--- a/bootloader_message/include/bootloader_message/bootloader_message.h
+++ b/bootloader_message/include/bootloader_message/bootloader_message.h
@@ -86,7 +86,7 @@ bool clear_bootloader_message(std::string* err);
bool read_wipe_package(std::string* package_data, size_t size, std::string* err);
bool write_wipe_package(const std::string& package_data, std::string* err);
-void set_misc_device(const char* type, const char* name);
+void set_misc_device(std::string name);
void get_args(int *argc, char ***argv);
#else
diff --git a/twrp.cpp b/twrp.cpp
index ff40eb11c..88df452e7 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -176,11 +176,9 @@ int main(int argc, char **argv) {
TWPartition* misc = PartitionManager.Find_Partition_By_Path("/misc");
if (misc != NULL) {
if (misc->Current_File_System == "emmc") {
- set_misc_device("emmc", misc->Actual_Block_Device.c_str());
- } else if (misc->Current_File_System == "mtd") {
- set_misc_device("mtd", misc->MTD_Name.c_str());
+ set_misc_device(misc->Actual_Block_Device);
} else {
- LOGERR("Unknown file system for /misc\n");
+ LOGERR("Only emmc /misc is supported\n");
}
}
get_args(&argc, &argv);