From dff80042750992ed635056cd9719481a14f93007 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 --- 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 b1b8863fd..e93830505 100644 --- a/updater/updater_runtime.cpp +++ b/updater/updater_runtime.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -186,3 +187,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