From: Pavel Machek <pavel@suse.cz>
To: Hannes Reinecke <hare@suse.de>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>, mjg59@srcf.ucam.org
Subject: Re: [PATCH] Resume from initramfs
Date: Mon, 31 Jan 2005 19:15:53 +0100 [thread overview]
Message-ID: <20050131181553.GA1583@elf.ucw.cz> (raw)
In-Reply-To: <41FE3C34.4000200@suse.de>
Hi!
> >>--- linux-2.6.10/init/do_mounts.c.orig 2005-01-28
> >>10:25:35.000000000 +0100
> >>+++ linux-2.6.10/init/do_mounts.c 2005-01-28 10:30:43.000000000 +0100
> >>@@ -135,7 +135,7 @@ fail:
> >> * is mounted on rootfs /sys.
> >> */
> >>
> >>-dev_t __init name_to_dev_t(char *name)
> >>+dev_t name_to_dev_t(char *name)
> >>{
> >> char s[32];
> >> char *p;
> >
> >
> >Why do you need this one? /sys/power/resume accepts numeric values, it
> >should not need to translate...
> >
> swsusp_check is used by both entry points, and is itself not a init
> function.
> I simply found it bad style to reference a __init function from there.
> And name_to_dev_t is evil in itself. I'd gladly be rid of it if
> possible.
Can you do name_to_dev_t during resume= parsing? That's always done
during early boot...
> How about this version? Better?
Yes, a bit :-). We still need the docs :-).
Pavel
> @@ -121,45 +126,54 @@ static void finish(void)
> }
>
>
> -static int prepare(void)
> +static int prepare_processes(void)
> {
> int error;
>
> pm_prepare_console();
>
> sys_sync();
> +
> if (freeze_processes()) {
> error = -EBUSY;
> - goto Thaw;
> + return error;
> }
>
> if (pm_disk_mode == PM_DISK_PLATFORM) {
> if (pm_ops && pm_ops->prepare) {
> if ((error = pm_ops->prepare(PM_SUSPEND_DISK)))
> - goto Thaw;
> + return error;
> }
> }
If freezing processes fails, it returns with processes running, here
it returns with processes frozen. Bug?
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
prev parent reply other threads:[~2005-01-31 18:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-31 12:30 [PATCH] Resume from initramfs Hannes Reinecke
2005-01-31 12:43 ` Matthew Garrett
2005-01-31 13:15 ` Hannes Reinecke
2005-01-31 12:51 ` Pavel Machek
2005-01-31 14:09 ` Hannes Reinecke
2005-01-31 14:18 ` Matthew Garrett
2005-01-31 14:26 ` Hannes Reinecke
2005-01-31 14:26 ` Andreas Schwab
2005-01-31 14:28 ` Hannes Reinecke
2005-01-31 18:15 ` Pavel Machek [this message]
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=20050131181553.GA1583@elf.ucw.cz \
--to=pavel@suse.cz \
--cc=hare@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.