All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ted Ts'o <tytso@mit.edu>
To: Eric Sandeen <sandeen@redhat.com>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] e2fsck: check new sysfs interface to determine if we are on battery
Date: Mon, 20 Feb 2012 20:24:23 -0500	[thread overview]
Message-ID: <20120221012423.GA25249@thunk.org> (raw)
In-Reply-To: <4F42E2A2.1020703@redhat.com>

On Mon, Feb 20, 2012 at 06:17:38PM -0600, Eric Sandeen wrote:
> > You need to enumerate through all power supply devices with the
> > "type" = "Mains" attribute, and check if any of them have the
> > "online" attribute as "1".  If so you have AC power. If don't find
> > any power supply of "type" = "Mains" then you are on AC power
> > too. Only if you have one or more power supplies of "type" =
> > "Mains" and all of them have "online" = "0" then you are on
> > battery.

*Ugh*.  Why is it that the new interfaces are always more complicated.  :-(

> If your patch fixes the general case, I say go for it! :)

All's the world a Thinkpad, right?  :-)

							- Ted

      reply	other threads:[~2012-02-21  1:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-21  0:11 [PATCH] e2fsck: check new sysfs interface to determine if we are on battery Theodore Ts'o
2012-02-21  0:17 ` Eric Sandeen
2012-02-21  1:24   ` Ted Ts'o [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=20120221012423.GA25249@thunk.org \
    --to=tytso@mit.edu \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.