2 suspend.c | 38 ++++++++++++++++++++++++++------------
3 1 file changed, 26 insertions(+), 12 deletions(-)
5 Index: suspend-utils-1.0/suspend.c
6 ===================================================================
7 --- suspend-utils-1.0.orig/suspend.c
8 +++ suspend-utils-1.0/suspend.c
9 @@ -57,6 +57,15 @@ do { \
10 fprintf(stderr, "%s: " msg " Reason: %m\n", my_name, ## args); \
13 +#ifndef CONFIG_ARCH_S390
14 +#define suspend_warning(msg) \
16 + fprintf(stderr, "%s: " msg "\n", my_name); \
19 +#define suspend_warning(msg)
22 static char snapshot_dev_name[MAX_STR_LEN] = SNAPSHOT_DEVICE;
23 static char resume_dev_name[MAX_STR_LEN] = RESUME_DEVICE;
24 static loff_t resume_offset;
25 @@ -2489,21 +2498,24 @@ int main(int argc, char *argv[])
27 vt_fd = prepare_console(&orig_vc, &suspend_vc);
30 - if (vt_fd == -ENOTTY)
31 - suspend_error("No local tty. Remember to specify local " \
32 - "console after the remote.");
34 + if (vt_fd == -ENOTTY) {
35 + suspend_warning("Unable to switch virtual terminals, "
36 + "using the current console.");
38 suspend_error("Could not open a virtual terminal.");
39 - goto Close_snapshot_fd;
41 + goto Close_snapshot_fd;
45 splash_prepare(&splash, splash_param);
47 - if (lock_vt() < 0) {
49 - suspend_error("Could not lock the terminal.");
50 - goto Restore_console;
52 + if (lock_vt() < 0) {
54 + suspend_error("Could not lock the terminal.");
55 + goto Restore_console;
60 @@ -2547,10 +2559,12 @@ int main(int argc, char *argv[])
61 set_swappiness(orig_swappiness);
69 - restore_console(vt_fd, orig_vc);
71 + restore_console(vt_fd, orig_vc);