On Tue 2009-12-15 09:19:45, Stefan Seyfried wrote: > On Mon, 7 Dec 2009 18:17:36 -0600 > Victor Lowther <victor.lowther@xxxxxxxxx> wrote: > > On Dec 7, 2009, at 3:41 PM, "Rafael J. Wysocki" <rjw@xxxxxxx> wrote: > > > Can't you just use the error code returned by "echo mem > /sys/power/ > > > state"? > > > > I can, now that I know about it - I did not see anything about error > > codes when scanning the documentation. > > Note that "echo" only will return 0 or 1, not a real error code. You'll > need a 5-line C program to get the errno that's returned from the > kernel. > It might be interesting to know *why* it failed (e.g. no swap > partition or not enough space in there). ...and if the error codes are not unique enough, I guess we can just improve them. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm