GNU bug report logs - #25559
Trouble getting battery status

Previous Next

Package: emacs;

Reported by: Rahul Martim Juliato <rahuljuliato <at> gmail.com>

Date: Sat, 28 Jan 2017 00:25:01 UTC

Severity: minor

Tags: fixed, patch

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Rahul Martim Juliato <rahuljuliato <at> gmail.com>
Cc: 25559 <at> debbugs.gnu.org
Subject: bug#25559: Trouble getting battery status
Date: Fri, 23 Aug 2019 02:41:47 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> It looks like it just looks for batteries named BATx:
>
> (defcustom battery-linux-sysfs-regexp "[bB][aA][tT][0-9]?$"
>
> That seems unnecessary -- surely we can just look into all the
> directories there and see whether it looks like we have a battery
> directory?  The patch below does this, but perhaps it's problematic.  Do
> all power_supply/<battery> directories have a "capacity" file, or does
> that vary by Linux kernel version?

There were no comments, and I've tested the patch on three different
GNU/Linux systems, and it seems to work OK.  But like I said, I'm not
extremely confident about this change -- if this leads to problems,
feel free to revert.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 5 years and 275 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.