summaryrefslogtreecommitdiff
path: root/futility/updater_utils.c
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2019-11-22 08:42:30 +0800
committerCommit Bot <commit-bot@chromium.org>2019-11-27 16:58:19 +0000
commit6ef33b990578a9583a3ac53f2c835d4e16219b25 (patch)
tree56254eea8f613392c6447646bb5966e0a0858c80 /futility/updater_utils.c
parent45facd54087232ef3f354108e8429932e6f0355f (diff)
downloadvboot-6ef33b990578a9583a3ac53f2c835d4e16219b25.tar.gz
futility: updater: refactor: unify getting temp files for firmware images
Unify "create a temp file and write firmware image contents" to the new API get_firmware_image_temp_file with better error messages. BRANCH=none BUG=chromium:1024401 TEST=make clean && make runtests Change-Id: I441f24053a8d94def587cf8270c44a4bdce9a4fe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1928359 Reviewed-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Hung-Te Lin <hungte@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Auto-Submit: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'futility/updater_utils.c')
-rw-r--r--futility/updater_utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/futility/updater_utils.c b/futility/updater_utils.c
index 28d41984..7a8185b1 100644
--- a/futility/updater_utils.c
+++ b/futility/updater_utils.c
@@ -222,7 +222,9 @@ const char *get_firmware_image_temp_file(const struct firmware_image *image,
return NULL;
if (vb2_write_file(tmp_path, image->data, image->size) != VB2_SUCCESS) {
- ERROR("Cannot write temporary file for output: %s\n", tmp_path);
+ ERROR("Failed writing %s firmware image (%u bytes) to %s.\n",
+ image->programmer ? image->programmer : "temp",
+ image->size, tmp_path);
return NULL;
}
return tmp_path;