summaryrefslogtreecommitdiff
path: root/payload_generator/graph_utils.cc
diff options
context:
space:
mode:
authorAlex Deymo <deymo@chromium.org>2015-03-26 00:35:07 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-06-12 16:37:45 +0000
commit2b19cfbcdb1aa8c5d1f338d19312fe14b6734bd5 (patch)
treebd78c7fd410543e3ae0b2f90af34641ff3986a15 /payload_generator/graph_utils.cc
parenta376a6e9007539531e99d3e879bc72ad1273f72f (diff)
update_engine: Introduce FilesystemInterface abstraction.
The interaction with the filesystem in the payload generation process is hard-coded in several places, making it hard to mock out or use a different filesystem like squashfs for delta generation. For example, the metadata, regular file data and non-file data are handled by three different functions in a similar way, but with different code. This patch introcudes a filesystem abstraction to map files or pseudo-files (like the metadata, free-space, etc) into the same interface. The interface includes three implementations: for parsing ext2 filesystems using ext2fs (already used by the metadata parsing but not by the file data processing), a raw one for monolitic partitions like the kernel and a fake one used for testing without requiring to build/parse a real ext2 filesystem. BUG=chromium:331965 TEST=FEATURES=test emerge-link update_engine Change-Id: I1e14cf8f3883c8e9a1d471c8193c8da60776aa7c Reviewed-on: https://chromium-review.googlesource.com/275803 Reviewed-by: Don Garrett <dgarrett@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org>
Diffstat (limited to 'payload_generator/graph_utils.cc')
0 files changed, 0 insertions, 0 deletions