On Wed, Apr 02, 2008 at 01:34:27PM -0700, Junio C Hamano <gitster@xxxxxxxxx> wrote: > If it is "can't tell", then it is "can't tell". Don't you want to err on > the safe side? First, I think "can't tell" almost never means "on battery" these days, since the necessary kernel support is enabled by the distro's hotplug scripts. Second, that's what we do in case we fail to read for example /sys/class/power_supply/AC/online: just silently redirect the error to /dev/null and assume we are not on battery. I would say it does not worth doing so, but feel free to kick me if it's a must. :)
Attachment:
pgpQMC6y1Eu9v.pgp
Description: PGP signature