From: Nadav Har'El <n...@scylladb.com>
Committer: Nadav Har'El <n...@scylladb.com>
Branch: master
rogue: fix terminfo
We already know that QEMU has a bug which wrongly translates a bare linefeed
sent by the guest (intentionally!) to \n\r - this bug is known for 11 years
now, see
https://bugs.launchpad.net/qemu/+bug/1407813
https://bugs.launchpad.net/qemu/+bug/1715296
So if we take the host's terminfo files and want to use it in the guest, we
need to avoid using \n for moving the cursor directly down - because in qemu
it doesn't (the extra \r causes the cursor to move to the *beginning* of
that
line).
We had a sed script to use something else instead of \n, but it assumed
the file has the text "^J" and doesn't work if the file had "\n" - as it
now does in Fedora 27 for example. So update the sed script to allow both.
Signed-off-by: Nadav Har'El <n...@scylladb.com>
---
diff --git a/rogue/GET b/rogue/GET
--- a/rogue/GET
+++ b/rogue/GET
@@ -41,5 +41,5 @@ cd ..
# Build a fixed terminfo, which doesn't use linefeed to go down, but rather
# uses the down escape sequence - because Qemu screws up ^J and replaces it
# with ^J^M...
-infocmp xterm | sed 's/cud1=^J,/cud1=\\E[B,/; s/ind=^J,/ind=\\E[S,/;
s/xterm/unknown/' >terminfo.tmp
+infocmp xterm | sed 's/cud1=\(^J\|\\n\),/cud1=\\E[B,/; s/ind=\(^J\|
\\n\),/ind=\\E[S,/; s/xterm/unknown/' >terminfo.tmp
ncurses-5.9/progs/tic -o fixed-terminfo terminfo.tmp
--
You received this message because you are subscribed to the Google Groups "OSv
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.