Skip to content
Commit c62e6142 authored by Rasmus Villemoes's avatar Rasmus Villemoes Committed by Joe Hershberger
Browse files

fw_setenv: avoid writing environment when nothing has changed



In the case where one deletes an already-non-existing variable, or sets
a variable to the value it already has, there is no point in writing the
environment back, thus reducing wear on the underlying storage
device.

In the case of redundant environments, if the two environments
differ (e.g. because one is corrupt), make sure that any call of
fw_setenv causes the two to become synchronized, even if the fw_setenv
call does not change anything in the good copy.

Signed-off-by: default avatarRasmus Villemoes <rasmus.villemoes@prevas.dk>
Acked-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
parent 1785d8c3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment