diff options
author | Howard Chen <howardsoc@google.com> | 2019-09-15 23:16:06 +0800 |
---|---|---|
committer | Howard Chen <howardsoc@google.com> | 2019-09-20 16:41:39 +0000 |
commit | d5229bfe81c8a5138be611694c7cfbd7d914f0e4 (patch) | |
tree | 22d67cd7afddb0a03f2524e7b662e1ca74c4e7b5 /include | |
parent | 2d210a8d93e1c7bff5b094d03badec87f089bdc2 (diff) | |
download | gsid-d5229bfe81c8a5138be611694c7cfbd7d914f0e4.tar.gz |
Extract kDsuLpMetadataFile from CanBootIntoGsi
This CL extracts the kDsuLpMetadataFile from CanBootIntoGsi for 2nd init
to get the logical partition metadata.
Bug: 140092208
Test: gsi_tool install & reboot
Change-Id: I66b5bbb4d1a79ccfef5118a6463bf153f9e14afc
Diffstat (limited to 'include')
-rw-r--r-- | include/libgsi/libgsi.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/libgsi/libgsi.h b/include/libgsi/libgsi.h index 94e6f57..9b24f47 100644 --- a/include/libgsi/libgsi.h +++ b/include/libgsi/libgsi.h @@ -25,8 +25,14 @@ static constexpr char kGsiServiceName[] = "gsiservice"; static constexpr char kGsiBootedIndicatorFile[] = "/metadata/gsi/dsu/booted"; +static constexpr char kGsiLpNamesFile[] = "/metadata/gsi/dsu/lp_names"; + +static constexpr char kDsuLpMetadataFile[] = "/metadata/gsi/dsu/lp_metadata"; + static constexpr char kGsiBootedProp[] = "ro.gsid.image_running"; +static constexpr char kDsuPostfix[] = "_gsi"; + static constexpr int kMaxBootAttempts = 1; // Returns true if the currently running system image is a live GSI. @@ -43,11 +49,10 @@ bool UninstallGsi(); bool DisableGsi(); // Returns true if init should attempt to boot into a live GSI image, false -// otherwise. If true, then the path to the liblp metadata file is set. If -// false, an error message is set instead. +// otherwise. If false, an error message is set. // // This is only called by first-stage init. -bool CanBootIntoGsi(std::string* metadata_file, std::string* error); +bool CanBootIntoGsi(std::string* error); // Called by first-stage init to indicate that we're about to boot into a // GSI. |