forked from pool/systemd
.
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=903
This commit is contained in:
parent
b1459a8045
commit
e2327986a6
@ -0,0 +1,84 @@
|
|||||||
|
From: Werner Fink <werner@suse.de>
|
||||||
|
Date: Wed Sep 23 12:37:23 UTC 2015
|
||||||
|
Subject: Do not bother vistual console to much with GIO/PIO
|
||||||
|
|
||||||
|
This avoids broken virtual console mapping due stressed ioctl API
|
||||||
|
for the virtual consoles (boo#904214)
|
||||||
|
|
||||||
|
---
|
||||||
|
src/vconsole/vconsole-setup.c | 39 +++++++++++++++++++++++++--------------
|
||||||
|
1 file changed, 25 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
--- src/vconsole/vconsole-setup.c
|
||||||
|
+++ src/vconsole/vconsole-setup.c 2015-09-23 12:34:33.854018750 +0000
|
||||||
|
@@ -202,8 +202,13 @@ static void font_copy_to_all_vcs(int fd)
|
||||||
|
unsigned short map16[E_TABSZ];
|
||||||
|
struct unimapdesc unimapd;
|
||||||
|
struct unipair unipairs[USHRT_MAX];
|
||||||
|
+ struct console_font_op cfo = {};
|
||||||
|
int i, r;
|
||||||
|
|
||||||
|
+ bool hasmap8;
|
||||||
|
+ bool hasmap16;
|
||||||
|
+ bool hasunimap;
|
||||||
|
+
|
||||||
|
/* get active, and 16 bit mask of used VT numbers */
|
||||||
|
r = ioctl(fd, VT_GETSTATE, &vcs);
|
||||||
|
if (r < 0) {
|
||||||
|
@@ -211,10 +216,22 @@ static void font_copy_to_all_vcs(int fd)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /* copy font from active VT, where the font was uploaded to */
|
||||||
|
+ cfo.op = KD_FONT_OP_COPY;
|
||||||
|
+ cfo.height = vcs.v_active-1; /* tty1 == index 0 */
|
||||||
|
+
|
||||||
|
+ hasmap8 = (ioctl(fd, GIO_SCRNMAP, map8) >= 0);
|
||||||
|
+ hasmap16 = (ioctl(fd, GIO_UNISCRNMAP, map16) >= 0);
|
||||||
|
+
|
||||||
|
+ /* unimapd is a ushort count and a pointer to an
|
||||||
|
+ * array of struct unipair { ushort, ushort } */
|
||||||
|
+ unimapd.entries = unipairs;
|
||||||
|
+ unimapd.entry_ct = USHRT_MAX;
|
||||||
|
+ hasunimap = (ioctl(fd, GIO_UNIMAP, &unimapd) >= 0);
|
||||||
|
+
|
||||||
|
for (i = 1; i <= 15; i++) {
|
||||||
|
char vcname[strlen("/dev/vcs") + DECIMAL_STR_MAX(int)];
|
||||||
|
_cleanup_close_ int vcfd = -1;
|
||||||
|
- struct console_font_op cfo = {};
|
||||||
|
|
||||||
|
if (i == vcs.v_active)
|
||||||
|
continue;
|
||||||
|
@@ -229,25 +246,19 @@ static void font_copy_to_all_vcs(int fd)
|
||||||
|
if (vcfd < 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
- /* copy font from active VT, where the font was uploaded to */
|
||||||
|
- cfo.op = KD_FONT_OP_COPY;
|
||||||
|
- cfo.height = vcs.v_active-1; /* tty1 == index 0 */
|
||||||
|
+ /* copy font from active VT to vcs */
|
||||||
|
(void) ioctl(vcfd, KDFONTOP, &cfo);
|
||||||
|
|
||||||
|
- /* copy map of 8bit chars */
|
||||||
|
- if (ioctl(fd, GIO_SCRNMAP, map8) >= 0)
|
||||||
|
+ /* copy map of 8bit chars to vcs */
|
||||||
|
+ if (hasmap8)
|
||||||
|
(void) ioctl(vcfd, PIO_SCRNMAP, map8);
|
||||||
|
|
||||||
|
- /* copy map of 8bit chars -> 16bit Unicode values */
|
||||||
|
- if (ioctl(fd, GIO_UNISCRNMAP, map16) >= 0)
|
||||||
|
+ /* copy map of 8bit chars -> 16bit Unicode values to vcs */
|
||||||
|
+ if (hasmap16)
|
||||||
|
(void) ioctl(vcfd, PIO_UNISCRNMAP, map16);
|
||||||
|
|
||||||
|
- /* copy unicode translation table */
|
||||||
|
- /* unimapd is a ushort count and a pointer to an
|
||||||
|
- array of struct unipair { ushort, ushort } */
|
||||||
|
- unimapd.entries = unipairs;
|
||||||
|
- unimapd.entry_ct = USHRT_MAX;
|
||||||
|
- if (ioctl(fd, GIO_UNIMAP, &unimapd) >= 0) {
|
||||||
|
+ /* copy unicode translation table to vcs */
|
||||||
|
+ if (hasunimap) {
|
||||||
|
struct unimapinit adv = { 0, 0, 0 };
|
||||||
|
|
||||||
|
(void) ioctl(vcfd, PIO_UNIMAPCLR, &adv);
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 23 12:41:19 UTC 2015 - werner@suse.de
|
||||||
|
|
||||||
|
- Add patch let-vconsole-setup-get-properties-only-once-to-copy-them.patch
|
||||||
|
to avoid broken virtual console mapping due stressed ioctl API
|
||||||
|
for the virtual consoles (boo#904214)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Sep 7 12:21:06 UTC 2015 - werner@suse.de
|
Mon Sep 7 12:21:06 UTC 2015 - werner@suse.de
|
||||||
|
|
||||||
|
@ -244,6 +244,8 @@ Patch520: systemd-add-user-keep.patch
|
|||||||
Patch521: kbd-model-map.patch
|
Patch521: kbd-model-map.patch
|
||||||
# PATCH-WORKAROUND-SUSE (boo#939571)
|
# PATCH-WORKAROUND-SUSE (boo#939571)
|
||||||
Patch522: Correct_assert_on_unexpected_error_code.patch
|
Patch522: Correct_assert_on_unexpected_error_code.patch
|
||||||
|
# PATCH-FIX-SUSE Do not stress the kernel's vc ioctls (boo#904214)
|
||||||
|
Patch523: let-vconsole-setup-get-properties-only-once-to-copy-them.patch
|
||||||
|
|
||||||
# UDEV PATCHES
|
# UDEV PATCHES
|
||||||
# ============
|
# ============
|
||||||
@ -598,6 +600,7 @@ cp %{SOURCE7} m4/
|
|||||||
%patch520 -p1
|
%patch520 -p1
|
||||||
%patch521 -p1
|
%patch521 -p1
|
||||||
%patch522 -p0
|
%patch522 -p0
|
||||||
|
%patch523 -p0
|
||||||
|
|
||||||
# udev patches
|
# udev patches
|
||||||
%patch1001 -p1
|
%patch1001 -p1
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Sep 23 12:41:19 UTC 2015 - werner@suse.de
|
||||||
|
|
||||||
|
- Add patch let-vconsole-setup-get-properties-only-once-to-copy-them.patch
|
||||||
|
to avoid broken virtual console mapping due stressed ioctl API
|
||||||
|
for the virtual consoles (boo#904214)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Sep 7 12:21:06 UTC 2015 - werner@suse.de
|
Mon Sep 7 12:21:06 UTC 2015 - werner@suse.de
|
||||||
|
|
||||||
|
@ -239,6 +239,8 @@ Patch520: systemd-add-user-keep.patch
|
|||||||
Patch521: kbd-model-map.patch
|
Patch521: kbd-model-map.patch
|
||||||
# PATCH-WORKAROUND-SUSE (boo#939571)
|
# PATCH-WORKAROUND-SUSE (boo#939571)
|
||||||
Patch522: Correct_assert_on_unexpected_error_code.patch
|
Patch522: Correct_assert_on_unexpected_error_code.patch
|
||||||
|
# PATCH-FIX-SUSE Do not stress the kernel's vc ioctls (boo#904214)
|
||||||
|
Patch523: let-vconsole-setup-get-properties-only-once-to-copy-them.patch
|
||||||
|
|
||||||
# UDEV PATCHES
|
# UDEV PATCHES
|
||||||
# ============
|
# ============
|
||||||
@ -593,6 +595,7 @@ cp %{SOURCE7} m4/
|
|||||||
%patch520 -p1
|
%patch520 -p1
|
||||||
%patch521 -p1
|
%patch521 -p1
|
||||||
%patch522 -p0
|
%patch522 -p0
|
||||||
|
%patch523 -p0
|
||||||
|
|
||||||
# udev patches
|
# udev patches
|
||||||
%patch1001 -p1
|
%patch1001 -p1
|
||||||
|
Loading…
Reference in New Issue
Block a user