diff options
author | David Anderson <dvander@google.com> | 2019-01-17 13:34:38 -0800 |
---|---|---|
committer | David Anderson <dvander@google.com> | 2019-01-17 13:37:25 -0800 |
commit | 868dea548760d8958b57b80d6c1fae3563404dc5 (patch) | |
tree | caf817799a29a86a7fe3f70204ee112d1f0c0b7d /aidl | |
parent | a78f81163575fef31127ee4f79532d7172100c0f (diff) | |
download | gsid-868dea548760d8958b57b80d6c1fae3563404dc5.tar.gz |
Add GSI installation error codes.
It is useful to distinguish errors like "not enough free space" from "random
syscall failed for unknown reason". To do this, let's introduce some
error codes to IGsiService::startGsiInstall and setGsiBootable.
Bug: 122556707
Test: manual test
Change-Id: I227720129cb0d44599ae7d6f797a071431e0b057
Diffstat (limited to 'aidl')
-rw-r--r-- | aidl/android/gsi/IGsiService.aidl | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/aidl/android/gsi/IGsiService.aidl b/aidl/android/gsi/IGsiService.aidl index e144161..57028fb 100644 --- a/aidl/android/gsi/IGsiService.aidl +++ b/aidl/android/gsi/IGsiService.aidl @@ -26,6 +26,18 @@ interface IGsiService { const int STATUS_WORKING = 1; const int STATUS_COMPLETE = 2; + /* Install succeeded. */ + const int INSTALL_OK = 0; + /* Install failed with a generic system error. */ + const int INSTALL_ERROR_GENERIC = 1; + /* Install failed because there was no free space. */ + const int INSTALL_ERROR_NO_SPACE = 2; + /** + * Install failed because the file system was too fragmented or did not + * have enough additional free space. + */ + const int INSTALL_ERROR_FILE_SYSTEM_CLUTTERED = 3; + /** * Begins a GSI installation. * @@ -40,9 +52,9 @@ interface IGsiService { * @param gsiSize The size of the on-disk GSI image. * @param userdataSize The desired size of the userdata partition. * @param wipeUserdata True to wipe destination userdata. - * @return true on success, false otherwise. + * @return 0 on success, an error code on failure. */ - boolean startGsiInstall(long gsiSize, long userdataSize, boolean wipeUserdata); + int startGsiInstall(long gsiSize, long userdataSize, boolean wipeUserdata); /** * Write bytes from a stream to the on-disk GSI. @@ -71,9 +83,9 @@ interface IGsiService { * Complete a GSI installation and mark it as bootable. The caller is * responsible for rebooting the device as soon as possible. * - * @return true on success, false otherwise. + * @return INSTALL_* error code. */ - boolean setGsiBootable(); + int setGsiBootable(); /** * Cancel an in-progress GSI install. |