[Nut-upsdev] Changes to usbhid-ups driver

Peter Selinger selinger at mathstat.dal.ca
Wed Sep 5 02:52:18 UTC 2007

Arjen de Korte wrote:
> Peter Selinger wrote:
> >> I just applied the patch (r1087) to make this effective (ie, let the
> >> belkin_format_serial() function modify hd->Serial, instead of just
> >> returning a pointer to the serial number). Is the same valid for the
> >> (usb_device *)descriptor.iManufacturer and (usb_device
> >> *)descriptor.iProduct by the way? There is no reason why we couldn't do
> >> the same for belkin_format_mfr() and belkin_format_model(), if that is
> >> useful.
> > Yes, that information is also unavailable in the usb_device
> > structure. I don't currently remember whether it is in the UPS.*
> > hierarchy, but I think it isn't. The belkin_format_mfr() etc functions
> > just return generic values unless better info is available. (From the
> > vendorid, we do know the manufacturer is Belkin). 
> Are these in HIDDumpTree maybe? It's a real simple addition to the
> subdriver (see r1087) and having the actual productname instead of just
> 'unknown' would be nice.

I'm unable to compile r1088. I get lots of undefined references in
libhid.c, see below. It seems that the global variables pDesc and
reportbuf are declared in libhid.h, but not defined. 

libhid.o(.text+0x353): In function `HIDDumpTree':
/home/selinger/projects/nut/drivers/libhid.c:280: undefined reference to `pDesc'
libhid.o(.text+0x427):/home/selinger/projects/nut/drivers/libhid.c:280: undefined reference to `pDesc'
libhid.o(.text+0x4aa): In function `HIDGetItemData':
/home/selinger/projects/nut/drivers/libhid.c:335: undefined reference to `pDesc'
libhid.o(.text+0x503): In function `HIDGetDataValue':
/home/selinger/projects/nut/drivers/libhid.c:360: undefined reference to `reportbuf'
libhid.o(.text+0x6a3): In function `HIDSetDataValue':
/home/selinger/projects/nut/drivers/libhid.c:434: undefined reference to `reportbuf'
libhid.o(.text+0x6d8):/home/selinger/projects/nut/drivers/libhid.c:442: undefined reference to `reportbuf'
libhid.o(.text+0x78e): In function `HIDGetEvents':
/home/selinger/projects/nut/drivers/libhid.c:473: undefined reference to `reportbuf'
libhid.o(.text+0x7d4):/home/selinger/projects/nut/drivers/libhid.c:480: undefined reference to `pDesc'
libhid.o(.text+0x806):/home/selinger/projects/nut/drivers/libhid.c:480: undefined reference to `pDesc'

-- Peter

More information about the Nut-upsdev mailing list