summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAndrei Dinu <andrei.adrianx.dinu@intel.com>2013-05-28 08:59:38 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-05-30 19:59:08 (GMT)
commitff9573f9317c2159b5f1705081d4b472cf717196 (patch)
treec3d370a978e1722398261f090b1e838ce16654dc /scripts
parente9648158c3e6ea5e7fe64c2f205a399473e4e2f9 (diff)
downloadpoky-ff9573f9317c2159b5f1705081d4b472cf717196.tar.gz
runqemu: Replaced "stty sane" with saved stty settings
stty manual says : "sane - Resets all modes to reasonable values for interactive terminal use." But reasonable isn't the most viable solution, because we want to keep the original stty settings before running runqemu. Saving the stty settings and setting them at the end of the runqemu script solves the terminal settings differences after the script ran. [Yocto #4512] (From OE-Core rev: 93e0ae68d2c1827370f4f9e95c2f0b7f98ba2cb8) Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com> [Added filename info in commit subject - sgw] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu-internal11
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index d4825d1..4f3ba7b 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -104,6 +104,9 @@ fi
104 104
105NFSRUNNING="false" 105NFSRUNNING="false"
106 106
107#capture original stty values
108ORIG_STTY=$(stty -g)
109
107if [ "$SLIRP_ENABLED" = "yes" ]; then 110if [ "$SLIRP_ENABLED" = "yes" ]; then
108 KERNEL_NETWORK_CMD="" 111 KERNEL_NETWORK_CMD=""
109 QEMU_TAP_CMD="" 112 QEMU_TAP_CMD=""
@@ -221,7 +224,11 @@ else
221 fi 224 fi
222 # If QEMU crashes or somehow tty properties are not restored 225 # If QEMU crashes or somehow tty properties are not restored
223 # after qemu exits, we need to run stty sane 226 # after qemu exits, we need to run stty sane
224 stty sane 227 #stty sane
228
229 #instead of using stty sane we set the original stty values
230 stty ${ORIG_STTY}
231
225 } 232 }
226 233
227 234
@@ -589,6 +596,8 @@ if [ "$SLIRP_ENABLED" != "yes" ]; then
589 cleanup 596 cleanup
590fi 597fi
591 598
599#set the original stty values before exit
600stty ${ORIG_STTY}
592trap - INT TERM QUIT 601trap - INT TERM QUIT
593 602
594return $ret 603return $ret