[Toybox] [RFC] New toy: acpi

Isaac ibid.ag at gmail.com
Mon Sep 9 20:46:49 PDT 2013


On Mon, Sep 09, 2013 at 11:39:23AM -0500, Rob Landley wrote:
> On 09/04/2013 10:10:18 PM, Isaac wrote:
> >I got tired of trying to guess how much terminal time I could get
> >in on my
> >phone.
> >So here's a basic acpi. I could probably add -c fairly easily
> >(print type, cur_state, and max_state)
> >-t is more difficult, since temperatures are reported in at least
> >1000 * degrees F and 10 * degrees C.
> >
> >I would like to hear if any part of the design needs work.
> 
> Applied, and put straight into toys/other because it's small/simple
> enough to clean up in one sitting.

Thanks.
I tried to keep it as short and plain as possible.

> Reshuffling so the declarations are at the start of blocks. I know
> c99 allows them to be all over the place, but I prefer to have them
> in one place (and put a blank line after them).
> 
> Using readall() and checking the return code. _Probably_ won't have
> a problem, but just in case...
> 
> You print out battery if -b or no flags, but adapter is only if
> given -a (and not no flags). I'm assuming this is intentional, but
> happy to take a patch if it's not?

Yes, I tried to make it behave more-or-less like the standard "acpi"
(should be installed on most Ubuntu systems by default).

Thanks,
Isaac Dunham

 1378784809.0


More information about the Toybox mailing list