[Pm-utils] [PATCH 1/6] Split hook running into two phases -- core and aux
Stefan Seyfried
seife at suse.de
Wed Jun 4 02:43:06 PDT 2008
Till Maas wrote:
> On Friday 16 May 2008 23:50:18 Stefan Seyfried wrote:
>
>> Until now, we just created $INHIBIT, possibly even with descriptive content
>> what failed and why we cannot suspend because of it, and thus had no need
>> to care for the return code. Just check if $INHIBIT is created at the end
>
> Who did this? In pm-utils 0.99.4 there was no hook that created $INHIBIT and
> it was also not documented.
No in-tree hook did it, since Peter argued that it is not needed. The
mechanism was there, though, in pm/functions.
It was used by the uswsusp-support patch used by me and Tim Dijkstra for
debian IIRC
>> The GUI app can show the user the logfile and the content of the $INHIBIT
>> file. This is not a perfect solution, but a reasonably simple one and then
>> we should try to avoid failing suspends anyway ;-)
>
> Imho the reason / error message for a suspend failure should go into the
> logfile and not be separated from it.
Both. So you can show a dialog like
###################################
# Sorry, suspend failed. #
# Reason: $FOO #
# #
# Do you want to see the logfile? #
# [YES] [NO] #
###################################
with $FOO being the short message from $INHIBIT.
(if suspend fails because of "no swap partition", then there is no need to dig
through megabytes of logfile).
--
Stefan Seyfried
R&D Team Mobile Devices | "Any ideas, John?"
SUSE LINUX Products GmbH, Nürnberg | "Well, surrounding them's out."
This footer brought to you by insane German lawmakers:
SUSE Linux Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
More information about the Pm-utils
mailing list