Merge "Fix "fastboot oem"." am: dbe9ab1074 am: c9d545855a
am: 8bb2503c78
Change-Id: I8e5854829bd1a85de9ba2f074f3e7eb5098fe70e
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
index f10b9ce..8a6877a 100644
--- a/fastboot/fastboot.cpp
+++ b/fastboot/fastboot.cpp
@@ -135,7 +135,7 @@
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_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(), "");
}