Re: [PATCH] e2fsck: check new sysfs interface to determine if we are on battery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux