summaryrefslogtreecommitdiff
path: root/fastboot/fastboot.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2017-05-11 15:05:13 -0700
committerElliott Hughes <enh@google.com>2017-05-11 15:05:13 -0700
commit29d5d7d7183876e250b5c2b735ab401d7947f72f (patch)
tree3a6fb80ed607423a000beaa62afd9f1db5cba265 /fastboot/fastboot.cpp
parent44f6592b0de532afeb3636afb5177fd39b2442ea (diff)
Fix "fastboot oem".
Broken by d6365a70527275f700b9594452020715a0c52510. Bug: https://issuetracker.google.com/38216236 Test: "fastboot oem uart enable" Change-Id: I672d5b96bb16fd77e7af61115b8a38606c691ea8
Diffstat (limited to 'fastboot/fastboot.cpp')
-rw-r--r--fastboot/fastboot.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index f10b9ce10..8a6877ad3 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -135,7 +135,7 @@ static std::string find_item_given_name(const char* 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) {
if (images[i].nickname && item == images[i].nickname) {
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) {
if (args->empty()) syntax_error("empty oem command");
- std::string command;
+ std::string command("oem");
while (!args->empty()) {
- if (!command.empty()) command += ' ';
- command += next_arg(args);
+ command += " " + next_arg(args);
}
-
fb_queue_command(command.c_str(), "");
}