.
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=705
This commit is contained in:
parent
304bcb7e09
commit
3efc4e356c
26
0001-machine-don-t-return-uninitialized-variable.patch
Normal file
26
0001-machine-don-t-return-uninitialized-variable.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From f14aa1f1b2e4e99ee20393871b5f64f1378ed6c3 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Gundersen <teg@jklm.no>
|
||||
Date: Sun, 6 Jul 2014 14:12:28 +0200
|
||||
Subject: [PATCH] machine: don't return uninitialized variable
|
||||
|
||||
Repotred by Ronny Chevalier
|
||||
---
|
||||
src/machine/machine.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git src/machine/machine.c src/machine/machine.c
|
||||
index c0fa1b2..cf38e3f 100644
|
||||
--- src/machine/machine.c
|
||||
+++ src/machine/machine.c
|
||||
@@ -371,7 +371,7 @@ static int machine_stop_scope(Machine *m) {
|
||||
free(m->scope_job);
|
||||
m->scope_job = job;
|
||||
|
||||
- return r;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
int machine_stop(Machine *m) {
|
||||
--
|
||||
1.7.9.2
|
||||
|
166
0002-vconsole-setup-run-setfont-before-loadkeys.patch
Normal file
166
0002-vconsole-setup-run-setfont-before-loadkeys.patch
Normal file
@ -0,0 +1,166 @@
|
||||
Based on abee28c56d523e55751b0c007d0bf812cc285c00 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Tue, 1 Jul 2014 22:20:11 -0400
|
||||
Subject: [PATCH] vconsole-setup: run setfont before loadkeys
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=80685
|
||||
|
||||
For SUSE please note that this had been ported on top of the patches
|
||||
* handle-disable_caplock-and-compose_table-and-kbd_rate.patch
|
||||
* handle-numlock-value-in-etc-sysconfig-keyboard.patch
|
||||
that is that now set_kbd_rate() will be called first before font_load().
|
||||
Then font_load() is followed by load_compose_table() and afterwards as
|
||||
in the original commit the keymap_load() follows.
|
||||
|
||||
---
|
||||
src/vconsole/vconsole-setup.c | 93 +++++++++++++++++++++---------------------
|
||||
1 file changed, 47 insertions(+), 46 deletions(-)
|
||||
|
||||
--- src/vconsole/vconsole-setup.c
|
||||
+++ src/vconsole/vconsole-setup.c 2014-07-07 12:30:27.390235226 +0000
|
||||
@@ -340,23 +340,20 @@ static int set_kbd_rate(const char *vc,
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
const char *vc;
|
||||
- char *vc_keymap = NULL;
|
||||
- char *vc_keymap_toggle = NULL;
|
||||
- char *vc_font = NULL;
|
||||
- char *vc_font_map = NULL;
|
||||
- char *vc_font_unimap = NULL;
|
||||
+ _cleanup_free_ char
|
||||
+ *vc_keymap = NULL, *vc_keymap_toggle = NULL,
|
||||
+ *vc_font = NULL, *vc_font_map = NULL, *vc_font_unimap = NULL;
|
||||
+ _cleanup_close_ int fd = -1;
|
||||
#ifdef HAVE_SYSV_COMPAT
|
||||
- char *vc_kbd_delay = NULL;
|
||||
- char *vc_kbd_rate = NULL;
|
||||
- char *vc_kbd_disable_caps_lock = NULL;
|
||||
- char *vc_kbd_numlock = NULL;
|
||||
- char *vc_compose_table = NULL;
|
||||
+ _cleanup_free_ char
|
||||
+ *vc_kbd_numlock = NULL, *vc_kbd_delay = NULL,
|
||||
+ *vc_kbd_rate = NULL, * vc_kbd_disable_caps_lock = NULL,
|
||||
+ *vc_compose_table = NULL;
|
||||
pid_t kbd_rate_pid = 0, compose_table_pid = 0;
|
||||
+ bool numlock = false;
|
||||
#endif
|
||||
- int fd = -1;
|
||||
bool utf8;
|
||||
bool disable_capslock = false;
|
||||
- bool numlock = false;
|
||||
pid_t font_pid = 0, keymap_pid = 0;
|
||||
bool font_copy = false;
|
||||
int r = EXIT_FAILURE;
|
||||
@@ -377,12 +374,12 @@ int main(int argc, char **argv) {
|
||||
fd = open_terminal(vc, O_RDWR|O_CLOEXEC);
|
||||
if (fd < 0) {
|
||||
log_error("Failed to open %s: %m", vc);
|
||||
- goto finish;
|
||||
+ return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (!is_vconsole(fd)) {
|
||||
log_error("Device %s is not a virtual console.", vc);
|
||||
- goto finish;
|
||||
+ return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
utf8 = is_locale_utf8();
|
||||
@@ -464,61 +461,65 @@ int main(int argc, char **argv) {
|
||||
} else
|
||||
#endif
|
||||
numlock = vc_kbd_numlock && strcaseeq(vc_kbd_numlock, "yes");
|
||||
-
|
||||
#endif
|
||||
}
|
||||
|
||||
+#ifdef HAVE_SYSV_COMPAT
|
||||
+finish:
|
||||
+ r = set_kbd_rate(vc, vc_kbd_rate, vc_kbd_delay, &kbd_rate_pid);
|
||||
+ if (r < 0) {
|
||||
+ log_error("Failed to start /bin/kbdrate: %s", strerror(-r));
|
||||
+ return EXIT_FAILURE;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
if (utf8)
|
||||
enable_utf8(fd);
|
||||
else
|
||||
disable_utf8(fd);
|
||||
|
||||
- r = EXIT_FAILURE;
|
||||
+ r = font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid);
|
||||
+ if (r < 0) {
|
||||
+ log_error("Failed to start " KBD_SETFONT ": %s", strerror(-r));
|
||||
+ return EXIT_FAILURE;
|
||||
+ }
|
||||
+
|
||||
+ if (font_pid > 0)
|
||||
+ wait_for_terminate_and_warn(KBD_SETFONT, font_pid);
|
||||
|
||||
- if (keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, disable_capslock, &keymap_pid) >= 0 &&
|
||||
#ifdef HAVE_SYSV_COMPAT
|
||||
- load_compose_table(vc, vc_compose_table, &compose_table_pid) >= 0 &&
|
||||
- set_kbd_rate(vc, vc_kbd_rate, vc_kbd_delay, &kbd_rate_pid) >= 0 &&
|
||||
+ r = load_compose_table(vc, vc_compose_table, &compose_table_pid);
|
||||
+ if (r < 0) {
|
||||
+ log_error("Failed to start " KBD_SETFONT ": %s", strerror(-r));
|
||||
+ return EXIT_FAILURE;
|
||||
+ }
|
||||
+
|
||||
+ if (compose_table_pid > 0)
|
||||
+ wait_for_terminate_and_warn(KBD_LOADKEYS, compose_table_pid);
|
||||
#endif
|
||||
- font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid) >= 0)
|
||||
- r = EXIT_SUCCESS;
|
||||
|
||||
-finish:
|
||||
+ r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, disable_capslock, &keymap_pid);
|
||||
+ if (r < 0) {
|
||||
+ log_error("Failed to start " KBD_LOADKEYS ": %s", strerror(-r));
|
||||
+ return EXIT_FAILURE;
|
||||
+ }
|
||||
+
|
||||
if (keymap_pid > 0)
|
||||
wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid);
|
||||
+
|
||||
+#ifdef HAVE_SYSV_COMPAT
|
||||
if (numlock)
|
||||
touch("/run/numlock-on");
|
||||
else
|
||||
unlink("/run/numlock-on");
|
||||
|
||||
-#ifdef HAVE_SYSV_COMPAT
|
||||
- if (compose_table_pid > 0)
|
||||
- wait_for_terminate_and_warn(KBD_LOADKEYS, compose_table_pid);
|
||||
-
|
||||
if (kbd_rate_pid > 0)
|
||||
wait_for_terminate_and_warn("/bin/kbdrate", kbd_rate_pid);
|
||||
#endif
|
||||
|
||||
- if (font_pid > 0) {
|
||||
- wait_for_terminate_and_warn(KBD_SETFONT, font_pid);
|
||||
- if (font_copy)
|
||||
- font_copy_to_all_vcs(fd);
|
||||
- }
|
||||
-
|
||||
- free(vc_keymap);
|
||||
- free(vc_font);
|
||||
- free(vc_font_map);
|
||||
- free(vc_font_unimap);
|
||||
- free(vc_kbd_numlock);
|
||||
-#ifdef HAVE_SYSV_COMPAT
|
||||
- free(vc_kbd_delay);
|
||||
- free(vc_kbd_rate);
|
||||
- free(vc_kbd_disable_caps_lock);
|
||||
- free(vc_compose_table);
|
||||
-#endif
|
||||
-
|
||||
- if (fd >= 0)
|
||||
- close_nointr_nofail(fd);
|
||||
+ /* Only copy the font when we started setfont successfully */
|
||||
+ if (font_copy && font_pid > 0)
|
||||
+ font_copy_to_all_vcs(fd);
|
||||
|
||||
return r;
|
||||
}
|
@ -651,6 +651,10 @@ Patch318: 0001-udev-net_setup_link-add-a-bit-more-logging.patch
|
||||
Patch319: 0003-namespace-make-sure-tmp-var-tmp-and-dev-are-writable.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/07/04
|
||||
Patch320: 0002-namespace-fix-uninitialized-memory-access.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/07/07
|
||||
Patch321: 0001-machine-don-t-return-uninitialized-variable.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/07/07
|
||||
Patch322: 0002-vconsole-setup-run-setfont-before-loadkeys.patch
|
||||
|
||||
# UDEV PATCHES
|
||||
# ============
|
||||
@ -1230,6 +1234,8 @@ cp %{SOURCE7} m4/
|
||||
%patch318 -p0
|
||||
%patch319 -p0
|
||||
%patch320 -p0
|
||||
%patch321 -p0
|
||||
%patch322 -p0
|
||||
|
||||
# udev patches
|
||||
%patch1001 -p1
|
||||
|
@ -646,6 +646,10 @@ Patch318: 0001-udev-net_setup_link-add-a-bit-more-logging.patch
|
||||
Patch319: 0003-namespace-make-sure-tmp-var-tmp-and-dev-are-writable.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/07/04
|
||||
Patch320: 0002-namespace-fix-uninitialized-memory-access.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/07/07
|
||||
Patch321: 0001-machine-don-t-return-uninitialized-variable.patch
|
||||
# PATCH-FIX-UPSTREAM added at 2014/07/07
|
||||
Patch322: 0002-vconsole-setup-run-setfont-before-loadkeys.patch
|
||||
|
||||
# UDEV PATCHES
|
||||
# ============
|
||||
@ -1225,6 +1229,8 @@ cp %{SOURCE7} m4/
|
||||
%patch318 -p0
|
||||
%patch319 -p0
|
||||
%patch320 -p0
|
||||
%patch321 -p0
|
||||
%patch322 -p0
|
||||
|
||||
# udev patches
|
||||
%patch1001 -p1
|
||||
|
Loading…
Reference in New Issue
Block a user