Re: [PATCH] Fix power checking on OS X

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

 



On Fri, Jun 12, 2015 at 6:46 AM, Eric Sunshine <sunshine@xxxxxxxxxxxxxx> wrote:
> On Thu, Jun 11, 2015 at 10:37 AM, Panagiotis Astithas <pastith@xxxxxxxxx> wrote:
>> The output of "pmset -g batt" changed at some point from
>> "Currently drawing from 'AC Power'" to the slightly different
>> "Now drawing from 'AC Power'". Starting the match from "drawing"
>> makes the check work in both old and new versions of OS X.
>
> Would it make sense to try to future-proof this further by searching
> only for "'AC" (including the leading single-quote) or just "AC"
> (without the leading quote)?
>
> (Genuine question. I don't have a strong feeling about it.)

It's a reasonable idea, although I'm wondering what are the odds of
pmset changing to output a string when running on battery in the
future, containing something like "no longer on 'AC Power'". That's
probably too far out though.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]