[Pm-utils] Question about hooks and suspend-hybrid.
Victor Lowther
victor.lowther at gmail.com
Tue Jul 1 18:59:45 PDT 2008
On Tue, 2008-07-01 at 17:10 +0200, Stefan Seyfried wrote:
> Hi,
>
> Victor Lowther wrote:
> > How about just passing $METHOD as the second parameter? Less parsing
>
> Yes, that sounds good. Basically the same, just easier to implement ;-)
Done, then.
> > but that should be left for pm-utils 2.x or somewhere further down the
> > line.
>
> Ok. I need it now, since i am implementing hybrid suspend now, but as long as
> we will have roughly compatible hooks in the future, we should be fine.
> (I believe that you could add it now, since it will be backwards compatible -
> the additional parameter would just be ignored by "old" hooks - actually, most
> new hooks will still ignore it since they don't need to know).
Oh, now that you brought it up, I will go ahead and implement the
two-parameter thing for the hooks for 1.2 (and revise the documentation.
The 2.0 thing was to no longer pass hibernate/thaw, but that is a more
speculative idea.
> > Depends on whether or not your in-kernel suspend is actually tuxonice in
> > disguise. :)
>
> Ok. With "in-kernel" i actually meant the one "in-tree", but actually it's
> great to have this feature in tuxonice, too.
>
> We'd still run hooks with (pseudo code):
>
> -----
> if [ $RESULT = $FROMRAM ]; then
> REVERSE=resume
> else
> REVERSE=thaw
> fi
>
> run_hooks $REVERSE $METHOD
> -----
>
> i guess?
Yep.
> > Does just passing $METHOD as the second parameter work for you?
>
> Yes, it's even easier ;-)
We have a plan.
> Thanks,
>
> Stefan
--
Victor Lowther
Ubuntu Certified Professional
More information about the Pm-utils
mailing list