summaryrefslogtreecommitdiff
path: root/futility/updater.h
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2018-10-17 12:03:24 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-10-24 13:03:18 -0700
commite1cc2b8ef8d27945043daf0e961fa1ddd40acfd4 (patch)
tree81fc8437a622068c8e2ac844690f145c3e6370f9 /futility/updater.h
parent9262fdd9651c44a0f1ca28ccd876543396baf1ce (diff)
downloadvboot-e1cc2b8ef8d27945043daf0e961fa1ddd40acfd4.tar.gz
futility: updater: Support --repack and --unpack
In order to make the firmware updater package more consistent file contents (for example, we don't want time stamps, and better if the files are always physically located in same order) we want to create and manipulate the ZIP based package directly using updater. BUG=chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ie4c5aafe51f633729de2879c73bf7074a695151f Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1286173 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Diffstat (limited to 'futility/updater.h')
-rw-r--r--futility/updater.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/futility/updater.h b/futility/updater.h
index 9c8502b1..5698f9ed 100644
--- a/futility/updater.h
+++ b/futility/updater.h
@@ -117,6 +117,7 @@ struct updater_config_arguments {
char *programmer, *model, *signature_id;
char *emulation, *sys_props, *write_protection;
char *output_dir;
+ char *repack, *unpack;
int is_factory, try_update, force_update, do_manifest, host_only;
int verbosity;
};
@@ -299,6 +300,21 @@ int archive_read_file(struct archive *ar, const char *fname,
uint8_t **data, uint32_t *size);
/*
+ * Writes a file into archive.
+ * If entry name (fname) is an absolute path (/file), always write into real
+ * file system.
+ * Returns 0 on success, otherwise non-zero as failure.
+ */
+int archive_write_file(struct archive *ar, const char *fname,
+ uint8_t *data, uint32_t size);
+
+/*
+ * Copies all entries from one archive to another.
+ * Returns 0 on success, otherwise non-zero as failure.
+ */
+int archive_copy(struct archive *from, struct archive *to);
+
+/*
* Creates a new manifest object by scanning files in archive.
* Returns the manifest on success, otherwise NULL for failure.
*/