summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorxiaolu <server@163.com>2015-02-22 13:49:35 +0100
committerDees Troy <dees_troy@teamw.in>2015-03-05 04:22:26 +0100
commite738da5e89fc2d1d392775336ae4eb41e26c4f77 (patch)
tree11b71419604eb6d2697962852aa7dd9635d0407b /gui
parentGUI: Terminal command: minor improvements (diff)
downloadandroid_bootable_recovery-e738da5e89fc2d1d392775336ae4eb41e26c4f77.tar
android_bootable_recovery-e738da5e89fc2d1d392775336ae4eb41e26c4f77.tar.gz
android_bootable_recovery-e738da5e89fc2d1d392775336ae4eb41e26c4f77.tar.bz2
android_bootable_recovery-e738da5e89fc2d1d392775336ae4eb41e26c4f77.tar.lz
android_bootable_recovery-e738da5e89fc2d1d392775336ae4eb41e26c4f77.tar.xz
android_bootable_recovery-e738da5e89fc2d1d392775336ae4eb41e26c4f77.tar.zst
android_bootable_recovery-e738da5e89fc2d1d392775336ae4eb41e26c4f77.zip
Diffstat (limited to '')
-rw-r--r--gui/action.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/gui/action.cpp b/gui/action.cpp
index 16a550ba1..342551247 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -1360,8 +1360,7 @@ int GUIAction::terminalcommand(std::string arg)
} else {
// Try to read output
memset(line, 0, sizeof(line));
- bytes_read = read(fd, line, sizeof(line));
- if (bytes_read > 0)
+ if(fgets(line, sizeof(line), fp) != NULL)
gui_print("%s", line); // Display output
else
keep_going = 0; // Done executing