[Nut-upsdev] [RFC apcsmart V3 09/18] drivers/apcsmart: add APC_USERCTRL and APC_CRUCIAL

Arjen de Korte nut+devel at de-korte.org
Sun Mar 6 17:15:31 UTC 2011

Citeren Michal Soltys <soltys op ziu.info>:

> APC_USERCTRL - allows permanent overriding of the variable. Meaning
> even if the ups supports reading and/or writing it, the driver will not
> allow it (actually it will behave as if the variable wasn't supported at
> all). This guarantees that the value set by the user in the
> configuration file is respected.

This is already the case. By disallowing the flags to be changed once  
the ST_FLAG_IMMUTABLE is set, the variable should no longer show up in  
the list of supported variables and the main driver code will disallow  
changing the value.

> Currently only battery.runtime.low overriding is allowed, which is
> necessary for proper functioning of ignorelb (if user decided to
> override that variable).

I'm not sure if I understand correctly what you're trying to do here,  
but drivers should respect the ST_FLAG_IMMUTABLE at all times. Even if  
the set value makes no sense at all, if people deliberately override a  
value, this is what they should get.

> APC_CRUCIAL - this flag enforces checking if the variable is actually
> supported.

That might be a good idea, but for the above reason I have not  
committed this patch now.

> Additionallly - the driver will ask user about reporting UPS models,
> which don't support command querying, but do support firmware query - in
> the other words - models which are not present in the compatibility table,
> but should be included there.

Good idea too, but be aware that the response to such messages has  
typically been very low.

Best regards, Arjen
Please keep list traffic on the list (off-list replies will be rejected)

More information about the Nut-upsdev mailing list