On 11-06-28 20:51, Arjen de Korte wrote:
Citeren Michal Soltys <[email protected]>:

Log:
apcsmart: allow tearing down/setting up serial connection during
normal activity;

If this is needed at all (why?), I don't think this should be handled at
driver level, but this would need to be in the serial.c library.
Opening/closing a serial port is independent from the protocol used (no
data is to be transmitted), so if there is a need for the apcsmart
driver, likewise we will need this for other serial drivers as well. We
certainly don't want to duplicate this code for every serial driver we
support. One thing I fail to understand is why a driver should be able
to close a connection to the serial port. Could you please elaborate on
that?


It was one of the suggestions on that ubuntu's bugtracker (which Arnaud pointed me to). Supposedly reopening serial port could help with some pci based rs232 card. Flushing stale data was another thing to do (which the driver is doing now).

https://bugs.launchpad.net/ubuntu/+source/nut/+bug/535583/comments/10

Truth to be told, I don't really like the final effect - for the same reason you mentioned - as I pretty much duplicated the serial.c's code, with major difference being return <something> vs. fatalx() . The change is more along the lines "it won't hurt to do that just in case".

I could revert it to the earlier version and keep only non-serial related changes.

It works fine, but certainly feels out of place a bit.

changes should fix #535583 as well

Please be a little more verbose in your patch comments. It took me a
while to find that this was not a bug on Alioth, but on Ubuntu instead.
This may be obvious for you, this information will be lost once this
makes it into the drivers ChangeLog.

Best regards, Arjen

Will do. I tried to be as terse as possible, though it looks like I overdid a bit.


_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsdev

Reply via email to