[Pm-utils] Re: Better integration with power management scripts

Stefan Seyfried seife at suse.de
Thu Apr 27 14:30:07 PDT 2006

On Thu, Apr 27, 2006 at 05:15:29PM -0400, David Zeuthen wrote:

> Looks like we are finding a middle ground :-)


> > But without any information system, the user maybe does not even know that
> > he should look into syslog. You click suspend, and... nothing happens. 
> Well, on failure Suspend() on HAL throws an exception and I believe
> g-p-m puts up a notification on your desktop. 


> I'd like pm-utils to be lean and I don't want it to depend on whether
> D-BUS is available. There's probably better ways of doing error
> reporting though.
> hughsie, pjones, mjg59: How do we sanely report errors in pm-suspend and
> friends?

return a non-zero return value and put the text in a file in $WELLKNOWNPLACE.
So the frontend can fetch the text if it wants to in case of an error, or
it can just ignore the text.

(i am not too good on DBUS and HAL, so "non-zero return value" means: signal
 an error :-)

> Sure, we just need to define the return codes for pm-suspend and friends
> and where to put the textual output too.

Exactly, thats the whole deal AFAICS.
Stefan Seyfried                  \ "I didn't want to write for pay. I
QA / R&D Team Mobile Devices      \ wanted to be paid for what I write."
SUSE LINUX Products GmbH, Nürnberg \                    -- Leonard Cohen

More information about the Pm-utils mailing list