diff options
author | David Anderson <dvander@google.com> | 2019-02-27 13:33:44 -0800 |
---|---|---|
committer | David Anderson <dvander@google.com> | 2019-03-06 14:22:52 -0800 |
commit | 564a04c02e5867666356311ab5d2ad5889c7a0dd (patch) | |
tree | e297746b3abbe601ab7c3b0eaaf12e49fdaf6926 /file_paths.h | |
parent | d81e1256f2be8181882191a4f6b92e1854cc8e72 (diff) | |
download | gsid-564a04c02e5867666356311ab5d2ad5889c7a0dd.tar.gz |
Allow gsi_tool to set whether GSI installs are single-boot or not.
Previously, init would always write "disabled" back to
/metadata/gsi/install_status, to effectively restore the host image
after the GSI reboots. This is not always desirable, so this patch
introduces a new "one_shot_boot" file. If present, the GSI will only
boot once, otherwise, it can persist until manually disabled.
This also adds a new getGsiBootStatus() method to IGsiService, so the UI
can determine whether the GSI is in single-boot mode or not.
Bug: 126148526
Test: install GSI, reboot twice - back to normal image
gsi_tool enable --single-boot, reboot twice, back to normal image
gsi_tool enable, reboot twice, still in GSI
Change-Id: I49bffea09bc9871502ce7bf3c27518a435357ecd
Diffstat (limited to 'file_paths.h')
-rw-r--r-- | file_paths.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/file_paths.h b/file_paths.h index 0005b19..0fc255e 100644 --- a/file_paths.h +++ b/file_paths.h @@ -26,6 +26,7 @@ static constexpr char kSystemFile[] = "/data/gsi/system_gsi.img"; static constexpr char kGsiMetadataFolder[] = "/metadata/gsi"; static constexpr char kGsiLpMetadataFile[] = "/metadata/gsi/lp_metadata"; +static constexpr char kGsiOneShotBootFile[] = "/metadata/gsi/one_shot_boot"; // This file can contain the following values: // [int] - boot attempt counter, starting from 0 |