summaryrefslogtreecommitdiff
path: root/file_paths.h
diff options
context:
space:
mode:
authorDavid Anderson <dvander@google.com>2019-04-16 17:14:09 -0700
committerDavid Anderson <dvander@google.com>2019-05-13 13:51:49 -0700
commitb2988ab452dd0d0ae63e1d3d3983a2af58caf1e0 (patch)
treebc377f52d59655b79e841baa4556b141b3e22154 /file_paths.h
parent448072c2e355cc39c9186257d4b688cb202e4fb8 (diff)
downloadgsid-b2988ab452dd0d0ae63e1d3d3983a2af58caf1e0.tar.gz
Refactor gsid to separate the installer code.
GsiService is getting to be pretty unreadable, in part because it's a lot of code, but also because it mixes a lot of state in with the rest of GsiService. It's not always clear when it's okay for GsiService to rely on state set by the install process. To make this much more clear, this patch separates all the installer code into a separate GsiInstaller class, which has its own header and source files. GsiService will instantiate a GsiInstaller as needed and destroy it to either cancel or complete an install. As an added bonus, install cleanup can now be handled in the GsiInstaller destructor, rather than on an ad-hoc basis in GsiService. Bug: N/A Test: gsi_tool install gsi_tool disable gsi_tool enable gsi_tool wipe gsi_tool cancel Change-Id: I26b2a48487a1df903d1805de80b0c6f2a074f997
Diffstat (limited to 'file_paths.h')
-rw-r--r--file_paths.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/file_paths.h b/file_paths.h
index 64814b5..5a16491 100644
--- a/file_paths.h
+++ b/file_paths.h
@@ -19,6 +19,9 @@
namespace android {
namespace gsi {
+static constexpr char kGsiDataFolder[] = "/data/gsi/";
+static constexpr char kUserdataDevice[] = "/dev/block/by-name/userdata";
+
static constexpr char kGsiMetadataFolder[] = "/metadata/gsi";
static constexpr char kGsiLpMetadataFile[] = "/metadata/gsi/lp_metadata";
static constexpr char kGsiOneShotBootFile[] = "/metadata/gsi/one_shot_boot";