summaryrefslogtreecommitdiff
path: root/payload_generator/ext2_filesystem.h
diff options
context:
space:
mode:
authorAlex Deymo <deymo@chromium.org>2015-06-26 20:57:06 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-07-02 03:02:58 +0000
commit2e9533be9eb2e022d653400f47a354a7f06bf9db (patch)
tree1f70cfce9819476bb1065bda730833b89502d62d /payload_generator/ext2_filesystem.h
parent13e0dd63e68f2003b46d413d499760b5a7631a03 (diff)
update_engine: Expose the update_engine.conf in the FilesystemInterface.
The old image contains a /etc/update_engine.conf file that states the payload version supported by that image. Currently we read this file directly from the mounted filesystem and parse its contents. To stop mounting the filesystem we need to retrieve the information on this file somehow. This patch extends the FilesystemInterface with a method to load the update_engine.conf settings from the filesystem and implemets it using ext2fs on ext2 filesystems. CQ-DEPED=CL:282380 BUG=chromium:305832 TEST=Added new unittests with and without this file. Change-Id: I41b41e8aac58c645fb40aabfe340cde8821e405a Reviewed-on: https://chromium-review.googlesource.com/282381 Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org> Trybot-Ready: Alex Deymo <deymo@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org>
Diffstat (limited to 'payload_generator/ext2_filesystem.h')
-rw-r--r--payload_generator/ext2_filesystem.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/payload_generator/ext2_filesystem.h b/payload_generator/ext2_filesystem.h
index c87849ca..66cb65f5 100644
--- a/payload_generator/ext2_filesystem.h
+++ b/payload_generator/ext2_filesystem.h
@@ -40,12 +40,17 @@ class Ext2Filesystem : public FilesystemInterface {
// and bitmap tables.
bool GetFiles(std::vector<File>* files) const override;
+ bool LoadSettings(chromeos::KeyValueStore* store) const override;
+
private:
Ext2Filesystem() = default;
// The ext2 main data structure holding the filesystem.
ext2_filsys filsys_ = nullptr;
+ // The file where the filesystem is stored.
+ std::string filename_;
+
DISALLOW_COPY_AND_ASSIGN(Ext2Filesystem);
};