[Nut-upsdev] (1) belkinunv patch problem (2) sharing shutdown code
for belkin-hid and unv
j T
hyvan_trant at hotmail.com
Mon May 29 16:36:09 UTC 2006
Hi Peter
I just started looking into squeezing "wait on shutdown" into the Belkin HID
subdriver and I noticed that my modification of belkinunv.c has a problem;
the original driver behaviour (the lines that set REG_RESTARTTIMER and
REG_SHUTDOWNTIMER (lines 1145 and 1146 in my source)) won't work as they are
wrapped up in a couple of upslogx() functions. I originally did this to
avoid the box being turned off while I was testing things, and forgot to
unwrap them again!
WRT to the belkin-hid subdriver, I was thinking it would be fairly sensible
to have the code related to the shutdown behaviour (the routines
belkin_wait, belkin_force_off and upsdrv_shutdown) in a single source file,
and to share that source file between both belkinunv and belkin-hid. That
way there'd only be one instance of that code to maintain. HOWEVER, I have
no idea how feasible this would be, nor how simple/complex it would be to
pull the code out of its current location and make it work.
Do you think that this would be a good enough idea to make the effort
involved in implementing it worthwhile?
Thanks
Jo Turner
--
jT | mail to: hyvan_trant at hotmail.com
** | website: http://www.chiark.greenend.org.uk/~jsturner/
More information about the Nut-upsdev
mailing list