[Nut-upsdev] [nut-commits] svn commit r1376 - in trunk: . server

Arnaud Quette aquette.dev at gmail.com
Tue Apr 1 09:24:11 UTC 2008


2008/3/28, Arjen de Korte <nut+devel at de-korte.org>:
> > 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.

well, I'm still unsure. This current unsorted version might be
puzzling to users.

>  > Finally, I've seen the netxml-ups pollinterval commit. So, ready to roll
>  > out?
>
>
> Yes. I'm fine with it.

ok, I still have an incoming patch to review against Testing, and
we'll then roll out -pre1.

thanks,
Arnaud
-- 
Linux / Unix Expert R&D - MGE Office Protection Systems - http://www.mgeops.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://people.debian.org/~aquette/
Free Software Developer - http://arnaud.quette.free.fr/



More information about the Nut-upsdev mailing list