lkml.org 
[lkml]   [2005]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Resume from initramfs
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!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.378 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site