[Nut-upsdev] [nut-commits] svn commit r1376 - in trunk: . server
Arjen de Korte
nut+devel at de-korte.org
Fri Mar 28 10:40:57 UTC 2008
> ok, I've made some quick testing (will do deeper ones during the -pre
> cycle though).
> usbhid-ups -k acts as expected. I've also tested upsrw and upscmd.
> everything seems fine.
Great.
> The only cosmetic remark I have (and I don't recall if it was prev.
> there) is the non sorted list of commands that upscmd outputs...
The commands are put into a linked list, where the first command in the
list will be shown first by NUT. The 'usbhid-ups' driver will add the
commands in the order they are in the HID-to-NUT mapping table. So if this
table is sorted, the commands will also be sorted. By their very nature,
the 'composite' commands are not in this table. Since we need to know
which commands are available (maybe the UPS already provides them), we can
add these only after the HID-to-NUT mapping is completed. Therefor, they
will also show up last (not sorted).
There is no easy way to change this. Probably the most elegant way to do
it, would be not to use a singly linked list anymore, but a sorted binary
tree instead (like we already do for the variables themselves), so that we
fix this in one go for all drivers. But I seriously doubt if this cosmetic
thing is worth the (coding) effort.
> Finally, I've seen the netxml-ups pollinterval commit. So, ready to roll
> out?
Yes. I'm fine with it.
Best regards, Arjen
More information about the Nut-upsdev
mailing list