public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Stefan Seyfried <stefan.seyfried@googlemail.com>
Cc: pm list <linux-pm@lists.linux-foundation.org>
Subject: Re: [PATCH 1/1] Add /sys/power/last_state support
Date: Wed, 6 Jan 2010 08:01:07 +0100	[thread overview]
Message-ID: <20100106070107.GB1382@ucw.cz> (raw)
In-Reply-To: <20091215091945.66b245ed@strolchi.home.s3e.de>

On Tue 2009-12-15 09:19:45, Stefan Seyfried wrote:
> On Mon, 7 Dec 2009 18:17:36 -0600
> Victor Lowther <victor.lowther@gmail.com> wrote:
> > On Dec 7, 2009, at 3:41 PM, "Rafael J. Wysocki" <rjw@sisk.pl> 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

      reply	other threads:[~2010-01-06  7:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3c192bd846cc4337d9999c6cd66b649232d9561c.1260074113.git.victor.lowther@gmail.com>
2009-12-07 21:41 ` [PATCH 1/1] Add /sys/power/last_state support Rafael J. Wysocki
2009-12-08  0:17   ` Victor Lowther
2009-12-15  8:19     ` Stefan Seyfried
2010-01-06  7:01       ` Pavel Machek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100106070107.GB1382@ucw.cz \
    --to=pavel@ucw.cz \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=stefan.seyfried@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox