diff options
author | David Anderson <dvander@google.com> | 2019-03-12 15:24:53 -0700 |
---|---|---|
committer | David Anderson <dvander@google.com> | 2019-03-12 15:36:00 -0700 |
commit | eb30ac28295e99d805fc8f04440d5bf18b5d5896 (patch) | |
tree | 58ac4e38b7bca3177ceb6709399feb386b856c26 /gsi_service.h | |
parent | 5f80591e470203a9e2798fda04527bef631bddbd (diff) | |
download | gsid-eb30ac28295e99d805fc8f04440d5bf18b5d5896.tar.gz |
Allow specifying the GSI install path.
This patch follows up on the previous change which removed hardcoding of
/data/gsi. Now, the install path can be specified by gsi_tool or
IGsiService::beginGsiInstall. The path is normalized and then validated.
Currently, only /data/gsi is allowed, however this will be changed in
the near future.
This patch also introduces a new GsiInstallParams parcelable and
startGsiInstall will be deprecated.
Bug: 126230649
Test: gsi_tool --install-dir=/data/gsi works
Change-Id: Ic654f7c7475c17855b65e5917ebcb9ee60e32b79
Diffstat (limited to 'gsi_service.h')
-rw-r--r-- | gsi_service.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gsi_service.h b/gsi_service.h index b563e41..272d524 100644 --- a/gsi_service.h +++ b/gsi_service.h @@ -41,6 +41,7 @@ class GsiService : public BinderService<GsiService>, public BnGsiService { binder::Status startGsiInstall(int64_t gsiSize, int64_t userdataSize, bool wipeUserdata, int* _aidl_return) override; + binder::Status beginGsiInstall(const GsiInstallParams& params, int* _aidl_return) override; binder::Status commitGsiChunkFromStream(const ::android::os::ParcelFileDescriptor& stream, int64_t bytes, bool* _aidl_return) override; binder::Status getInstallProgress(::android::gsi::GsiProgress* _aidl_return) override; @@ -86,8 +87,8 @@ class GsiService : public BinderService<GsiService>, public BnGsiService { uint64_t actual_size; }; - int StartInstall(const std::string& install_dir, int64_t gsi_size, int64_t userdata_size, - bool wipe_userdata); + int ValidateInstallParams(GsiInstallParams* params); + int StartInstall(const GsiInstallParams& params); int PerformSanityChecks(); int PreallocateFiles(); int PreallocateUserdata(); |