Preliminary support for lz4diff + EROFS parsing
Most of the changes in this CL is to propagate compressed file
information from FilesystemInterface to delta_diff_utils.
But delta_diff_util functions already take so many parameters, so
instead of adding two more, we just pass the FilesystemInterface::File
object.
Test: th
Bug: 206729162
Change-Id: Iaf3df2acda294d2d23dd5ac4f4b3d9a708c46393
diff --git a/payload_generator/filesystem_interface.h b/payload_generator/filesystem_interface.h
index 2d2846d..0c2f05e 100644
--- a/payload_generator/filesystem_interface.h
+++ b/payload_generator/filesystem_interface.h
@@ -35,6 +35,7 @@
#include <puffin/utils.h>
#include "update_engine/lz4diff/lz4diff_format.h"
+#include "update_engine/lz4diff/lz4diff.h"
#include "update_engine/update_metadata.pb.h"
namespace chromeos_update_engine {
@@ -44,12 +45,13 @@
// This represents a file or pseudo-file in the filesystem. It can include
// all sort of files, like symlinks, hardlinks, directories and even a file
// entry representing the metadata, free space, journaling data, etc.
+
struct File {
File() { memset(&file_stat, 0, sizeof(file_stat)); }
// The stat struct for the file. This is invalid (inode 0) for some
// pseudo-files.
- struct stat file_stat;
+ struct stat file_stat = {};
// The absolute path to the file inside the filesystem, for example,
// "/usr/bin/bash". For pseudo-files, like blocks associated to internal