From 0c328d02c1546537478ffc575eed128e69fce84a Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Tue, 28 Apr 2020 13:31:11 -0700 Subject: Add add_slot_suffix function. This function appends androidboot.slot_suffix to the value of the argument. Test: apply update Bug: 153581609 Change-Id: I28a4047b5f2051acc039084f65a71deb492d9dcb (cherry picked from commit dff80042750992ed635056cd9719481a14f93007) Merged-In: I28a4047b5f2051acc039084f65a71deb492d9dcb --- updater/updater_runtime.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'updater/updater_runtime.cpp') diff --git a/updater/updater_runtime.cpp b/updater/updater_runtime.cpp index c4222a56e..2e840b972 100644 --- a/updater/updater_runtime.cpp +++ b/updater/updater_runtime.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -130,3 +131,7 @@ int UpdaterRuntime::Tune2Fs(const std::vector& args) const { // tune2fs changes the filesystem parameters on an ext2 filesystem; it returns 0 on success. return tune2fs_main(tune2fs_args.size() - 1, tune2fs_args.data()); } + +std::string UpdaterRuntime::AddSlotSuffix(const std::string_view arg) const { + return std::string(arg) + fs_mgr_get_slot_suffix(); +} -- cgit v1.2.3