xen/53299d8f-xenconsole-reset-tty-on-failure.patch
Charles Arnold 73fd9f3c19 - Upstream patches from Jan
53356c1e-x86-HVM-correct-CPUID-leaf-80000008-handling.patch
  533ad1ee-VMX-fix-PAT-value-seen-by-guest.patch
  533d413b-x86-mm-fix-checks-against-max_mapped_pfn.patch

- bnc#862608 - SLES 11 SP3 vm-install should get RHEL 7 support
  when released
  53206661-pygrub-support-linux16-and-initrd16.patch
- Upstream bug fixes
  53299d8f-xenconsole-reset-tty-on-failure.patch
  53299d8f-xenconsole-tolerate-tty-errors.patch
- fix build for armv7l and aarch64

- Remove compiletime strings from qemu-upstream
  qemu-xen-upstream-megasas-buildtime.patch

- bnc#871546 - KMPs are not signed in SUSE:SLE-12:GA? 
  xen.spec

- Upstream patches from Jan
  532fff53-x86-fix-determination-of-bit-count-for-struct-domain-allocations.patch
  5331917d-x86-enforce-preemption-in-HVM_set_mem_access-p2m_set_mem_access.patch
- Drop xsa89.patch for upstream version (see bnc#867910, 5331917d-x86-enforce...)

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=309
2014-04-10 06:04:31 +00:00

55 lines
1.7 KiB
Diff

Subject: tools/console: reset tty when xenconsole fails
From: Ian Jackson ian.jackson@eu.citrix.com Mon Feb 24 15:16:19 2014 +0000
Date: Wed Mar 19 13:37:19 2014 +0000:
Git: 111931f36885874103d65685ab15ea3d25d93da7
If xenconsole (the client program) fails, it calls err. This would
previously neglect to reset the user's terminal to sanity. Use atexit
to do so.
This routinely happens in Xen 4.4 RC5 with pygrub because libxl
writes the value "" to the tty xenstore key when using xenconsole.
After this patch this just results in a harmless error message.
Reported-by: M A Young <m.a.young@durham.ac.uk>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: M A Young <m.a.young@durham.ac.uk>
CC: Ian Campbell <Ian.Campbell@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: Fix whitespace error (reintroduce hard tab)
Fix commit message not to claim ignorance about root cause
Index: xen-4.4.0-testing/tools/console/client/main.c
===================================================================
--- xen-4.4.0-testing.orig/tools/console/client/main.c
+++ xen-4.4.0-testing/tools/console/client/main.c
@@ -258,6 +258,13 @@ typedef enum {
CONSOLE_SERIAL,
} console_type;
+static struct termios stdin_old_attr;
+
+static void restore_term_stdin(void)
+{
+ restore_term(STDIN_FILENO, &stdin_old_attr);
+}
+
int main(int argc, char **argv)
{
struct termios attr;
@@ -384,9 +391,9 @@ int main(int argc, char **argv)
}
init_term(spty, &attr);
- init_term(STDIN_FILENO, &attr);
+ init_term(STDIN_FILENO, &stdin_old_attr);
+ atexit(restore_term_stdin); /* if this fails, oh dear */
console_loop(spty, xs, path);
- restore_term(STDIN_FILENO, &attr);
free(path);
free(dom_path);