From c674dfb5848845afa1de64cab1e94693c54f741e Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Thu, 20 Dec 2018 14:25:15 -0800 Subject: Use dynamically linked f2fs executables. It also reduces the space cost for devices using f2fs (e.g. crosshatch). /sbin/mkfs.f2fs 722560 => /system/bin/make_f2fs 49568 /sbin/sload.f2fs 1182456 => /system/bin/sload_f2fs 150032 Test: Build and boot recovery on crosshatch. Factory reset. Test: Install a non-A/B OTA package that formats a f2fs partition. Change-Id: Ibe70c8d91a1d07e1c78ff9eac19b1f7955800161 --- updater/install.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'updater') diff --git a/updater/install.cpp b/updater/install.cpp index 0e1028bd1..20a204a83 100644 --- a/updater/install.cpp +++ b/updater/install.cpp @@ -482,18 +482,19 @@ Value* FormatFn(const char* name, State* state, const std::vector f2fs_args = { - "/sbin/mkfs.f2fs", "-g", "android", "-w", "512", location + "/system/bin/make_f2fs", "-g", "android", "-w", "512", location }; if (size >= 512) { f2fs_args.push_back(std::to_string(size / 512)); } if (auto status = exec_cmd(f2fs_args); status != 0) { - LOG(ERROR) << name << ": mkfs.f2fs failed (" << status << ") on " << location; + LOG(ERROR) << name << ": make_f2fs failed (" << status << ") on " << location; return StringValue(""); } - if (auto status = exec_cmd({ "/sbin/sload.f2fs", "-t", mount_point, location }); status != 0) { - LOG(ERROR) << name << ": sload.f2fs failed (" << status << ") on " << location; + if (auto status = exec_cmd({ "/system/bin/sload_f2fs", "-t", mount_point, location }); + status != 0) { + LOG(ERROR) << name << ": sload_f2fs failed (" << status << ") on " << location; return StringValue(""); } -- cgit v1.2.3