public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Erik Rigtorp <erik@rigtorp.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kernel/power/swsusp.c
Date: Mon, 5 Jul 2004 12:54:21 +0200	[thread overview]
Message-ID: <20040705105421.GA8680@linux.nu> (raw)
In-Reply-To: <20040704151848.GC8488@elf.ucw.cz>

[-- Attachment #1: Type: text/plain, Size: 311 bytes --]

On Sun, Jul 04, 2004 at 05:18:49PM +0200, Pavel Machek wrote:
> Actually, this has several advantages -- you can actually see the
> messages of the kernel during resume. And reading does logically
> belong to the kernel doing boot, so it belongs on its screen, too...

Here's a clean patch that does just that.

[-- Attachment #2: swsusp-alloc-console-later.patch --]
[-- Type: text/plain, Size: 858 bytes --]

diff -Nru linux-2.6.7/kernel/power/swsusp.c linux-2.6.7-pavel/kernel/power/swsusp.c
--- linux-2.6.7/kernel/power/swsusp.c	2004-06-16 07:19:02.000000000 +0200
+++ linux-2.6.7-pavel/kernel/power/swsusp.c	2004-07-04 15:15:25.000000000 +0200
@@ -1190,9 +1190,6 @@
 	}
 	MDELAY(1000);
 
-	if (pm_prepare_console())
-		printk("swsusp: Can't allocate a console... proceeding\n");
-
 	if (!resume_file[0] && resume_status == RESUME_SPECIFIED) {
 		printk( "suspension device unspecified\n" );
 		return -EINVAL;
@@ -1201,12 +1198,15 @@
 	printk( "resuming from %s\n", resume_file);
 	if (read_suspend_image(resume_file, 0))
 		goto read_failure;
+
+	if (pm_prepare_console())
+		printk("swsusp: Can't allocate a console... proceeding\n");
+
 	device_suspend(4);
 	do_magic(1);
 	panic("This never returns");
 
 read_failure:
-	pm_restore_console();
 	return 0;
 }
 

  reply	other threads:[~2004-07-05 11:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-03 17:28 [PATCH] kernel/power/swsusp.c Erik Rigtorp
2004-07-03 20:46 ` Pavel Machek
2004-07-04 11:49   ` Erik Rigtorp
2004-07-04 22:50     ` Nigel Cunningham
2004-07-04 13:37   ` Erik Rigtorp
2004-07-04 15:18     ` Pavel Machek
2004-07-05 10:54       ` Erik Rigtorp [this message]
2004-07-05 15:13         ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040705105421.GA8680@linux.nu \
    --to=erik@rigtorp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox