diff options
author | Edward O'Callaghan <quasisec@google.com> | 2023-03-07 21:59:47 +1100 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-03-15 13:15:27 +0000 |
commit | e29eac41dce1a5e423d739fc47abfd2b2bda22df (patch) | |
tree | 77a26d7acd233a53ecc921812db55a73ad54ae67 /futility/futility.h | |
parent | 9082d13a642049aae3002850296b5fc53d6b687f (diff) | |
download | vboot-e29eac41dce1a5e423d739fc47abfd2b2bda22df.tar.gz |
futility/: Replace futil_copy_file_or_die() implfactory-skyrim-15384.B
Replace shell-script C with actual library calls to copy
file content. Don't die, dying is bad. Use '0660' as the
default dest file perm mask over the default system umask
inherited form the environment applied to the source file
permissions. Add error handling so we have a idea what
happened.
BUG=b:268397597
TEST=`emerge-nissa vboot_reference`.
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
TEST=`cros_run_unit_tests --board nissa --packages vboot_reference`.
Change-Id: Ibe4745dbad20504a1ff7e39e10cbf18ed1831354
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4313546
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Diffstat (limited to 'futility/futility.h')
-rw-r--r-- | futility/futility.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/futility/futility.h b/futility/futility.h index 221590c8..3a276996 100644 --- a/futility/futility.h +++ b/futility/futility.h @@ -113,8 +113,8 @@ void update_hwid_digest(struct vb2_gbb_header *gbb); int print_hwid_digest(struct vb2_gbb_header *gbb, const char *banner, const char *footer); -/* Copies a file or dies with an error message */ -void futil_copy_file_or_die(const char *infile, const char *outfile); +/* Copies a file. */ +int futil_copy_file(const char *infile, const char *outfile); /* Possible file operation errors */ enum futil_file_err { |