Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8bb2503c authored by Elliott Hughes's avatar Elliott Hughes Committed by android-build-merger
Browse files

Merge "Fix "fastboot oem"." am: dbe9ab10

am: c9d54585

Change-Id: I22af3acd882355fd096d3e6078fe7fb6aa8ce2b1
parents b3b67ada c9d54585
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -135,7 +135,7 @@ static std::string find_item_given_name(const char* img_name) {
    return android::base::StringPrintf("%s/%s", dir, img_name);
    return android::base::StringPrintf("%s/%s", dir, img_name);
}
}


std::string find_item(const std::string& item) {
static std::string find_item(const std::string& item) {
    for (size_t i = 0; i < arraysize(images); ++i) {
    for (size_t i = 0; i < arraysize(images); ++i) {
        if (images[i].nickname && item == images[i].nickname) {
        if (images[i].nickname && item == images[i].nickname) {
            return find_item_given_name(images[i].img_name);
            return find_item_given_name(images[i].img_name);
@@ -1262,12 +1262,10 @@ static void do_bypass_unlock_command(std::vector<std::string>* args) {
static void do_oem_command(std::vector<std::string>* args) {
static void do_oem_command(std::vector<std::string>* args) {
    if (args->empty()) syntax_error("empty oem command");
    if (args->empty()) syntax_error("empty oem command");


    std::string command;
    std::string command("oem");
    while (!args->empty()) {
    while (!args->empty()) {
        if (!command.empty()) command += ' ';
        command += " " + next_arg(args);
        command += next_arg(args);
    }
    }

    fb_queue_command(command.c_str(), "");
    fb_queue_command(command.c_str(), "");
}
}