[Nut-upsuser] Driver macosx-ups failing on Yosemite
Charles Lepple
clepple at gmail.com
Sat Jun 27 20:37:05 UTC 2015
On Jun 27, 2015, at 9:17 AM, Charles Lepple <clepple at gmail.com> wrote:
> On Jun 26, 2015, at 11:07 PM, Sundeep Mediratta <smedius at gmail.com> wrote:
>
>> 0.000233 upsdrv_initups(): Power Sources blob:
>> <CFArray 0x7ffd18605480 [0x7fff7443bed0]>{type = immutable, count = 1, values = (
>> 0 : <CFBasicHash 0x7ffd18605360 [0x7fff7443bed0]>{type = immutable dict, count = 10,
>> entries =>
>
> Thanks. There is a subtle difference in the "Power Sources" blob: on 10.9 and earlier, it is a dictionary rather than an array. I will try later today to see if there is a better way to enumerate the power sources.
I can't test this easily on 10.10 (my 10.10 box is powered by a serial UPS that does not show up in Energy Saver), but it uses the proper API now, and works on 10.9.
I pushed the branch as macosx_power_dict:
https://github.com/networkupstools/nut/commit/b608975b55895e853ba8d24fc08761bff2c65940
Patch: https://github.com/networkupstools/nut/compare/macosx_power_dict.diff
I don't use MacPorts much, but I think this is how you would add this patch to the NUT portfile:
https://guide.macports.org/#development.patches.source
patchfiles macosx_power_dict.diff
patch.pre_args -p1
--
Charles Lepple
clepple at gmail
More information about the Nut-upsuser
mailing list