Hello community,
here is the log from the commit of package suspend for openSUSE:Factory checked in at 2012-05-10 14:34:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/suspend (Old)
and /work/SRC/openSUSE:Factory/.suspend.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "suspend", Maintainer is "hmacht@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/suspend/suspend.changes 2012-05-07 22:52:47.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.suspend.new/suspend.changes 2012-05-10 14:34:50.000000000 +0200
@@ -1,0 +2,5 @@
+Tue May 8 03:52:23 UTC 2012 - jeffm@suse.com
+
+- s2disk: Do not fail hibernation withoug a VT console (bnc#472861).
+
+-------------------------------------------------------------------
New:
----
s2disk-do-not-fail-hibernation-withoug-a-vt-console
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ suspend.spec ++++++
--- /var/tmp/diff_new_pack.kuNkqL/_old 2012-05-10 14:34:52.000000000 +0200
+++ /var/tmp/diff_new_pack.kuNkqL/_new 2012-05-10 14:34:52.000000000 +0200
@@ -57,6 +57,7 @@
Patch16: suspend-splash-verbose-debug.diff
#Mandriva patch to enable plymouth support (Thanks to F. Crozat)
Patch17: suspend-plymouth.patch
+Patch18: s2disk-do-not-fail-hibernation-withoug-a-vt-console
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 x86_64 ppc ppc64
%if 0%{?suse_version}
@@ -89,6 +90,7 @@
%patch13 -p0
%patch16 -p1
%patch17 -p1
+%patch18 -p1
cp %{S:3} scripts/
#cp -vb --suffix=-0.5 %{S:99} whitelist.c
++++++ s2disk-do-not-fail-hibernation-withoug-a-vt-console ++++++
From: Rafael J. Wysocki
Subject: s2disk: Do not fail hibernation withoug a VT console
Currently, s2disk fails to hibernate if there is no VT console
available to it, because it can't switch to a different VT in that
case. However, switching VTs is not really essential and it should
be safe to carry out hibernation using the current console for
diagnostics. For this reason, modify s2disk to prevent it from
failing when it can't use a VT console.
Signed-off-by: Rafael J. Wysocki
Acked-by: Jeff Mahoney
---
suspend.c | 38 ++++++++++++++++++++++++++------------
1 file changed, 26 insertions(+), 12 deletions(-)
Index: suspend-utils/suspend.c
===================================================================
--- suspend-utils.orig/suspend.c
+++ suspend-utils/suspend.c
@@ -57,6 +57,15 @@ do { \
fprintf(stderr, "%s: " msg " Reason: %m\n", my_name, ## args); \
} while (0)
+#ifdef CONFIG_ARCH_S390
+#define suspend_warning(msg)
+#else
+#define suspend_warning(msg) \
+do { \
+ fprintf(stderr, "%s: " msg "\n", my_name); \
+} while (0)
+#endif
+
static char snapshot_dev_name[MAX_STR_LEN] = SNAPSHOT_DEVICE;
static char resume_dev_name[MAX_STR_LEN] = RESUME_DEVICE;
static loff_t resume_offset;
@@ -2480,21 +2489,24 @@ int main(int argc, char *argv[])
vt_fd = prepare_console(&orig_vc, &suspend_vc);
if (vt_fd < 0) {
- ret = errno;
- if (vt_fd == -ENOTTY)
- suspend_error("No local tty. Remember to specify local " \
- "console after the remote.");
- else
+ if (vt_fd == -ENOTTY) {
+ suspend_warning("Unable to switch virtual terminals, "
+ "using the current console.");
+ } else {
suspend_error("Could not open a virtual terminal.");
- goto Close_snapshot_fd;
+ ret = errno;
+ goto Close_snapshot_fd;
+ }
}
splash_prepare(&splash, splash_param);
- if (lock_vt() < 0) {
- ret = errno;
- suspend_error("Could not lock the terminal.");
- goto Restore_console;
+ if (vt_fd >= 0) {
+ if (lock_vt() < 0) {
+ ret = errno;
+ suspend_error("Could not lock the terminal.");
+ goto Restore_console;
+ }
}
splash.progress(5);
@@ -2538,10 +2550,12 @@ int main(int argc, char *argv[])
set_swappiness(orig_swappiness);
close_swappiness();
- unlock_vt();
+ if (vt_fd >= 0)
+ unlock_vt();
Restore_console:
splash.finish();
- restore_console(vt_fd, orig_vc);
+ if (vt_fd >= 0)
+ restore_console(vt_fd, orig_vc);
Close_snapshot_fd:
close(snapshot_fd);
Close_resume_fd:
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org