summaryrefslogtreecommitdiffstats
path: root/src/net.h
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-11-13 20:08:56 +0100
committerRoland Hieber <rhi@pengutronix.de>2021-03-16 15:23:44 +0100
commit0a75604bc61f74fb798001f308cf8b6406974db9 (patch)
tree217ffbaa432a975ec9a9b20e1ca725fe8a7839c8 /src/net.h
parent4826dcbce7498b255e9840ad903fea8eca9e1bcf (diff)
downloaddt-utils-0a75604bc61f74fb798001f308cf8b6406974db9.tar.gz
dt-utils-0a75604bc61f74fb798001f308cf8b6406974db9.tar.xz
barebox-state: have the --set option to avoid writes if possible
barebox-state --set always dirties the state when successful. Users seeking to conserve write cycles thus have to --get the variable in question first to check whether to write it. Make life of such users easier by having barebox-state support this out-of-the-box. This allows users to fire and forget execute barebox-state. This arguably should have been the behavior from the beginning, the state implementation shared by barebox and dt-utils already marks the state dirty if buckets appear corrupted on probe, so there is no extra benefit in always executing the write. The comparison to determine whether the state should be dirtied does an extra allocation in interest of clarity. This overhead is deemed negligible compared to I/O and it makes the code easier to follow. Suggested-by: Jan Lübbe <jlu@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Message-Id: <20201113190856.3197-1-a.fatoum@pengutronix.de> Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Diffstat (limited to 'src/net.h')
0 files changed, 0 insertions, 0 deletions