summaryrefslogtreecommitdiff
path: root/payload_generator/filesystem_interface.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/filesystem_interface.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/filesystem_interface.h')
-rw-r--r--payload_generator/filesystem_interface.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/payload_generator/filesystem_interface.h b/payload_generator/filesystem_interface.h
index 501a6be9..186eac43 100644
--- a/payload_generator/filesystem_interface.h
+++ b/payload_generator/filesystem_interface.h
@@ -20,6 +20,7 @@
#include <vector>
#include <base/macros.h>
+#include <chromeos/key_value_store.h>
#include "update_engine/update_metadata.pb.h"
@@ -66,6 +67,10 @@ class FilesystemInterface {
// Returns whether the function succeeded.
virtual bool GetFiles(std::vector<File>* files) const = 0;
+ // Load the image settings stored in the filesystem in the
+ // /etc/update_engine.conf file. Returns whether the settings were found.
+ virtual bool LoadSettings(chromeos::KeyValueStore* store) const = 0;
+
protected:
FilesystemInterface() = default;