commands: nv: assure error code will be returned when an error occurred
Due to iteration over possibly multiple variables, the return value of
an individual call to nvvar_remove() / nvvar_add() gets lost.

This will result in do_nv() returning success (0) if any variable
processing failed as long as processing of the last variable succeeded.

Processing will not be aborted on individual errors, such as the 'cp'
handles it for invalid files.

Signed-off-by: Enrico Jorns <ejo@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 31fd03b commit 2145fdf074f9b377d2e8aefbcb4a1d3f114045f4
@Enrico Jorns Enrico Jorns authored on 1 Nov 2017
Sascha Hauer committed on 3 Nov 2017
Showing 1 changed file
View
commands/nv.c