projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
656d8da
)
fw_env: Add missing write failure check
author
Alex Kiernan
<alex.kiernan@gmail.com>
Wed, 12 Jun 2019 14:27:55 +0000
(15:27 +0100)
committer
Tom Rini
<trini@konsulko.com>
Thu, 20 Jun 2019 14:57:08 +0000
(10:57 -0400)
If flash_write fails, whilst we propagate this up to our caller, we need
to avoid swapping in the new file (if we're on a filesystem) in this
case.
Fixes:
dbc34323796b
("tools: env: Implement atomic replace for filesystem")
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
tools/env/fw_env.c
patch
|
blob
|
history
diff --git
a/tools/env/fw_env.c
b/tools/env/fw_env.c
index cfada0ee1157a9e8acdb612cb7a74281720d3af8..eef12dd2b7579a8a0d2f9fdef1c39446076c42cb 100644
(file)
--- a/
tools/env/fw_env.c
+++ b/
tools/env/fw_env.c
@@
-1317,7
+1317,7
@@
static int flash_io_write(int fd_current)
rc = -1;
}
- if (target_temp) {
+ if (
rc >= 0 &&
target_temp) {
int dir_fd;
dir_fd = open(dname, O_DIRECTORY | O_RDONLY);