diff options
author | Jaegeuk Kim <jaegeuk@google.com> | 2017-11-29 04:48:05 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@google.com> | 2017-12-05 05:27:49 +0100 |
commit | c1c7311b8ada7fce948afaabe91d72f4a7c0cb68 (patch) | |
tree | 882b4aea78fa10a3dab38f3d32aecd0fda5add84 /updater | |
parent | Merge "Detect interrupted update due to power off" (diff) | |
download | android_bootable_recovery-c1c7311b8ada7fce948afaabe91d72f4a7c0cb68.tar android_bootable_recovery-c1c7311b8ada7fce948afaabe91d72f4a7c0cb68.tar.gz android_bootable_recovery-c1c7311b8ada7fce948afaabe91d72f4a7c0cb68.tar.bz2 android_bootable_recovery-c1c7311b8ada7fce948afaabe91d72f4a7c0cb68.tar.lz android_bootable_recovery-c1c7311b8ada7fce948afaabe91d72f4a7c0cb68.tar.xz android_bootable_recovery-c1c7311b8ada7fce948afaabe91d72f4a7c0cb68.tar.zst android_bootable_recovery-c1c7311b8ada7fce948afaabe91d72f4a7c0cb68.zip |
Diffstat (limited to 'updater')
-rw-r--r-- | updater/install.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/updater/install.cpp b/updater/install.cpp index 870b85791..b83d30ff3 100644 --- a/updater/install.cpp +++ b/updater/install.cpp @@ -318,6 +318,15 @@ Value* FormatFn(const char* name, State* state, const std::vector<std::unique_pt LOG(ERROR) << name << ": mkfs.f2fs failed (" << status << ") on " << location; return StringValue(""); } + + const char* sload_argv[] = { "/sbin/sload.f2fs", "-t", mount_point.c_str(), location.c_str(), + nullptr }; + status = exec_cmd(sload_argv[0], const_cast<char**>(sload_argv)); + if (status != 0) { + LOG(ERROR) << name << ": sload.f2fs failed (" << status << ") on " << location; + return StringValue(""); + } + return StringValue(location); } else { LOG(ERROR) << name << ": unsupported fs_type \"" << fs_type << "\" partition_type \"" |