On 11-03-06 18:10, Arjen de Korte wrote:
Citeren Michal Soltys <[email protected]>:

In cases such as immutable flag over readable value, we have
to be able to acquire this info at driver level (to e.g. avoid
polling, if user defined a variable with 'override' prefix).

I'm not sure I like this. While it may seem a waste of effort to poll
for a variable and ignore the value later on, I'd prefer to do this in
one location (the dstate_*() functions) and not in the driver as well.

Best regards, Arjen

Well, driver has following scenarios to handle:

1) variable exists and .conf file has default.*
2) variable doesn't exist and .conf file has default.*
3) variable exists and .conf file has override.*
4) variable doesn't exist and .conf file has override.*

The only "problematic" case is #3, and the only way I see currently is through checking the flag - as checking if the variable already exists (which implies being present in .conf file) is not enough. And if I poll such variable either way, user's override is lost - so even if dstate_*() would handle it, the user provided values would have to be stored somewhere else.

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

Reply via email to