adb: windows: fix adb execute root cmd with no tips

fwrite can cross windows platform to show log on terminal,
so we use it instead of WriteFdExactly.

Change-Id: I252c15a0bc72e1dbd98b7b5ec8000ecdcde16416
Signed-off-by: Junyong Sun <sunjy516@gmail.com>
This commit is contained in:
Junyong Sun 2020-01-15 16:34:58 +08:00
parent 4659cdaf5c
commit 1ffccf5c8b
1 changed files with 1 additions and 1 deletions

View File

@ -1125,8 +1125,8 @@ static bool adb_root(const char* command) {
return false;
}
fwrite(buf, 1, sizeof(buf) - bytes_left, stdout);
fflush(stdout);
WriteFdExactly(STDOUT_FILENO, buf, sizeof(buf) - bytes_left);
if (cur != buf && strstr(buf, "restarting") == nullptr) {
return true;
}