Hi,

On Wed, Nov 29, 2006 at 10:16:12PM +0100, Tim Dijkstra wrote:
> On Wed, 29 Nov 2006 12:09:02 +0100
> "Rafael J. Wysocki" <[EMAIL PROTECTED]> wrote:

> > On Wednesday, 29 November 2006 11:59, Tim Dijkstra wrote:

> > > If the kernel doesn't have support for platform mode, uswsusp complains
> > > loudly.
> > > 
> > > suspend: pm_ops->prepare returned error -1
> > > suspend: Snapshotting system
> > > ...
> > > suspend: Saving image data pages ...
> > > suspend: pm_ops->enter returned error -1, calling power_off
> > > 
> > > These are harmless messages, because it will just fallback to poweroff,
> > > but it confuses users. I propose to remove the messages.
> > > 
> > > OK to commit?
> > 
> > As far as I'm concerned it's OK, but this is Stefan's code, IIRC, so let's
> > wait for him to comment. ;-)
> 
> OK. What do you think stefan?

I think it would be better to check errno on the first of the ioctls and if
it says ENOTTY ("not implemented" in our case), then just print a harmless
"suspend: falling back to shutdown mode" message and set use_platform_mode
to 0.

I'll try to do a patch for this if nobody beats me to it :-)

I don't like to silently ignore such possible errors, even if i have not yet
seen a machine where they actually happened (other than on an too old kernel).
This said, reporting the "-1" from the ioctl is of course pretty useless ;-)

-- 
Stefan Seyfried
QA / R&D Team Mobile Devices        |              "Any ideas, John?"
SUSE LINUX Products GmbH, Nürnberg  | "Well, surrounding them's out." 

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Suspend-devel mailing list
Suspend-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/suspend-devel

Reply via email to