Merge changes Ia84ed9ec,I1c0fde72 am: 10533c57ed
am: b6bc0075f4
Change-Id: I4371bb9df7da381a7b8630a3b1c6a6afefbc5e73
This commit is contained in:
commit
d095e07371
7 changed files with 10 additions and 10 deletions
|
|
@ -312,7 +312,7 @@ std::string adb_get_android_dir_path() {
|
||||||
std::string android_dir = user_dir + OS_PATH_SEPARATOR + ".android";
|
std::string android_dir = user_dir + OS_PATH_SEPARATOR + ".android";
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
if (stat(android_dir.c_str(), &buf) == -1) {
|
if (stat(android_dir.c_str(), &buf) == -1) {
|
||||||
if (adb_mkdir(android_dir.c_str(), 0750) == -1) {
|
if (adb_mkdir(android_dir, 0750) == -1) {
|
||||||
PLOG(FATAL) << "Cannot mkdir '" << android_dir << "'";
|
PLOG(FATAL) << "Cannot mkdir '" << android_dir << "'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ class BugreportTest : public ::testing::Test {
|
||||||
|
|
||||||
void ExpectBugreportzVersion(const std::string& version) {
|
void ExpectBugreportzVersion(const std::string& version) {
|
||||||
EXPECT_CALL(br_, SendShellCommand("bugreportz -v", false, _))
|
EXPECT_CALL(br_, SendShellCommand("bugreportz -v", false, _))
|
||||||
.WillOnce(DoAll(WithArg<2>(WriteOnStderr(version.c_str())),
|
.WillOnce(DoAll(WithArg<2>(WriteOnStderr(version)),
|
||||||
WithArg<2>(ReturnCallbackDone(0))));
|
WithArg<2>(ReturnCallbackDone(0))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -416,7 +416,7 @@ void adb_auth_init() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (const std::string& path : key_paths) {
|
for (const std::string& path : key_paths) {
|
||||||
load_keys(path.c_str());
|
load_keys(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1012,7 +1012,7 @@ bool do_sync_push(const std::vector<const char*>& srcs, const char* dst, bool sy
|
||||||
dst_dir.append(android::base::Basename(src_path));
|
dst_dir.append(android::base::Basename(src_path));
|
||||||
}
|
}
|
||||||
|
|
||||||
success &= copy_local_dir_remote(sc, src_path, dst_dir.c_str(), sync, false);
|
success &= copy_local_dir_remote(sc, src_path, dst_dir, sync, false);
|
||||||
continue;
|
continue;
|
||||||
} else if (!should_push_file(st.st_mode)) {
|
} else if (!should_push_file(st.st_mode)) {
|
||||||
sc.Warning("skipping special file '%s' (mode = 0o%o)", src_path, st.st_mode);
|
sc.Warning("skipping special file '%s' (mode = 0o%o)", src_path, st.st_mode);
|
||||||
|
|
@ -1128,7 +1128,7 @@ static bool copy_remote_dir_local(SyncConnection& sc, std::string rpath,
|
||||||
// Recursively build the list of files to copy.
|
// Recursively build the list of files to copy.
|
||||||
sc.Printf("pull: building file list...");
|
sc.Printf("pull: building file list...");
|
||||||
std::vector<copyinfo> file_list;
|
std::vector<copyinfo> file_list;
|
||||||
if (!remote_build_list(sc, &file_list, rpath.c_str(), lpath.c_str())) {
|
if (!remote_build_list(sc, &file_list, rpath, lpath)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1240,7 +1240,7 @@ bool do_sync_pull(const std::vector<const char*>& srcs, const char* dst,
|
||||||
dst_dir.append(android::base::Basename(src_path));
|
dst_dir.append(android::base::Basename(src_path));
|
||||||
}
|
}
|
||||||
|
|
||||||
success &= copy_remote_dir_local(sc, src_path, dst_dir.c_str(), copy_attrs);
|
success &= copy_remote_dir_local(sc, src_path, dst_dir, copy_attrs);
|
||||||
continue;
|
continue;
|
||||||
} else if (!should_pull_file(src_st.st_mode)) {
|
} else if (!should_pull_file(src_st.st_mode)) {
|
||||||
sc.Warning("skipping special file '%s' (mode = 0o%o)", src_path, src_st.st_mode);
|
sc.Warning("skipping special file '%s' (mode = 0o%o)", src_path, src_st.st_mode);
|
||||||
|
|
|
||||||
|
|
@ -422,7 +422,7 @@ static bool do_send(int s, const std::string& spec, std::vector<char>& buffer) {
|
||||||
bool result;
|
bool result;
|
||||||
uint32_t timestamp;
|
uint32_t timestamp;
|
||||||
if (S_ISLNK(mode)) {
|
if (S_ISLNK(mode)) {
|
||||||
result = handle_send_link(s, path.c_str(), ×tamp, buffer);
|
result = handle_send_link(s, path, ×tamp, buffer);
|
||||||
} else {
|
} else {
|
||||||
// Copy user permission bits to "group" and "other" permissions.
|
// Copy user permission bits to "group" and "other" permissions.
|
||||||
mode &= 0777;
|
mode &= 0777;
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ static void connect_service(unique_fd fd, std::string host) {
|
||||||
if (!strncmp(host.c_str(), "emu:", 4)) {
|
if (!strncmp(host.c_str(), "emu:", 4)) {
|
||||||
connect_emulator(host.c_str() + 4, &response);
|
connect_emulator(host.c_str() + 4, &response);
|
||||||
} else {
|
} else {
|
||||||
connect_device(host.c_str(), &response);
|
connect_device(host, &response);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send response for emulator and device
|
// Send response for emulator and device
|
||||||
|
|
|
||||||
|
|
@ -1805,7 +1805,7 @@ int FastBootTool::Main(int argc, char* argv[]) {
|
||||||
auto format = [&](const std::string& partition) {
|
auto format = [&](const std::string& partition) {
|
||||||
fb_perform_format(partition, 0, type_override, size_override, "");
|
fb_perform_format(partition, 0, type_override, size_override, "");
|
||||||
};
|
};
|
||||||
do_for_partitions(partition.c_str(), slot_override, format, true);
|
do_for_partitions(partition, slot_override, format, true);
|
||||||
} else if (command == "signature") {
|
} else if (command == "signature") {
|
||||||
std::string filename = next_arg(&args);
|
std::string filename = next_arg(&args);
|
||||||
std::vector<char> data;
|
std::vector<char> data;
|
||||||
|
|
@ -1876,7 +1876,7 @@ int FastBootTool::Main(int argc, char* argv[]) {
|
||||||
}
|
}
|
||||||
do_flash(partition.c_str(), fname.c_str());
|
do_flash(partition.c_str(), fname.c_str());
|
||||||
};
|
};
|
||||||
do_for_partitions(pname.c_str(), slot_override, flash, true);
|
do_for_partitions(pname, slot_override, flash, true);
|
||||||
} else if (command == "flash:raw") {
|
} else if (command == "flash:raw") {
|
||||||
std::string partition = next_arg(&args);
|
std::string partition = next_arg(&args);
|
||||||
std::string kernel = next_arg(&args);
|
std::string kernel = next_arg(&args);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue