Re: [PATCH] Fix power checking on OS X

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

 



Panagiotis Astithas <pastith@xxxxxxxxx> writes:

> 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.
>
> Signed-off-by: Panagiotis Astithas <pastith@xxxxxxxxx>
> ---

Hmph, is there any difference between this one and the original one
that I already queued several days ago?

>  contrib/hooks/pre-auto-gc-battery | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/hooks/pre-auto-gc-battery b/contrib/hooks/pre-auto-gc-battery
> index 9d0c2d1..6a2cdeb 100755
> --- a/contrib/hooks/pre-auto-gc-battery
> +++ b/contrib/hooks/pre-auto-gc-battery
> @@ -33,7 +33,7 @@ elif grep -q "AC Power \+: 1" /proc/pmu/info 2>/dev/null
>  then
>  	exit 0
>  elif test -x /usr/bin/pmset && /usr/bin/pmset -g batt |
> -	grep -q "Currently drawing from 'AC Power'"
> +	grep -q "drawing from 'AC Power'"
>  then
>  	exit 0
>  fi
--
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]