summaryrefslogtreecommitdiffstats
path: root/install/fuse_sdcard_install.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2019-04-30 08:48:02 +0200
committerTao Bao <tbao@google.com>2019-04-30 22:58:03 +0200
commitadc99efd1cfd94283c6a1c5c9e9a4ce4af2c5daf (patch)
tree13932498e10ef237aee01eeaed417d377f1a9816 /install/fuse_sdcard_install.cpp
parentinstall: Return bool for a few check functions. (diff)
downloadandroid_bootable_recovery-adc99efd1cfd94283c6a1c5c9e9a4ce4af2c5daf.tar
android_bootable_recovery-adc99efd1cfd94283c6a1c5c9e9a4ce4af2c5daf.tar.gz
android_bootable_recovery-adc99efd1cfd94283c6a1c5c9e9a4ce4af2c5daf.tar.bz2
android_bootable_recovery-adc99efd1cfd94283c6a1c5c9e9a4ce4af2c5daf.tar.lz
android_bootable_recovery-adc99efd1cfd94283c6a1c5c9e9a4ce4af2c5daf.tar.xz
android_bootable_recovery-adc99efd1cfd94283c6a1c5c9e9a4ce4af2c5daf.tar.zst
android_bootable_recovery-adc99efd1cfd94283c6a1c5c9e9a4ce4af2c5daf.zip
Diffstat (limited to 'install/fuse_sdcard_install.cpp')
-rw-r--r--install/fuse_sdcard_install.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/install/fuse_sdcard_install.cpp b/install/fuse_sdcard_install.cpp
index 1aa8768e7..a5caa6e75 100644
--- a/install/fuse_sdcard_install.cpp
+++ b/install/fuse_sdcard_install.cpp
@@ -133,7 +133,7 @@ static bool StartSdcardFuse(const std::string& path) {
return run_fuse_sideload(std::move(file_data_reader)) == 0;
}
-int ApplyFromSdcard(Device* device, RecoveryUI* ui) {
+InstallResult ApplyFromSdcard(Device* device, RecoveryUI* ui) {
if (ensure_path_mounted(SDCARD_ROOT) != 0) {
LOG(ERROR) << "\n-- Couldn't mount " << SDCARD_ROOT << ".\n";
return INSTALL_ERROR;
@@ -159,9 +159,8 @@ int ApplyFromSdcard(Device* device, RecoveryUI* ui) {
_exit(status ? EXIT_SUCCESS : EXIT_FAILURE);
}
- // FUSE_SIDELOAD_HOST_PATHNAME will start to exist once the fuse in child
- // process is ready.
- int result = INSTALL_ERROR;
+ // FUSE_SIDELOAD_HOST_PATHNAME will start to exist once the fuse in child process is ready.
+ InstallResult result = INSTALL_ERROR;
int status;
bool waited = false;
for (int i = 0; i < SDCARD_INSTALL_TIMEOUT; ++i) {
@@ -184,7 +183,7 @@ int ApplyFromSdcard(Device* device, RecoveryUI* ui) {
}
}
- result = install_package(FUSE_SIDELOAD_HOST_PATHNAME, false, false, 0 /*retry_count*/, ui);
+ result = InstallPackage(FUSE_SIDELOAD_HOST_PATHNAME, false, false, 0 /* retry_count */, ui);
break;
}