From 6d2a79839f99a4e8afc5983028e0b985a9169706 Mon Sep 17 00:00:00 2001 From: Yifan Hong Date: Tue, 18 Feb 2020 13:47:26 -0800 Subject: [PATCH] snapshotctl don't auto-merge. update_engine is now responsible for initiating the merge. snapshotctl becomes a debugging tool for libsnapshot now. Bug: 147696014 Test: libsnapshot_test Change-Id: Ia2527a35e0c0f0789dbe5c477e174663ef406903 --- CleanSpec.mk | 1 + fs_mgr/libsnapshot/Android.bp | 3 --- fs_mgr/libsnapshot/snapshotctl.cpp | 1 + fs_mgr/libsnapshot/snapshotctl.rc | 2 -- 4 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 fs_mgr/libsnapshot/snapshotctl.rc diff --git a/CleanSpec.mk b/CleanSpec.mk index c84bd24c4..0a534a2bd 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk @@ -90,3 +90,4 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/product_services) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/debug_ramdisk/product_services) $(call add-clean-step, find $(PRODUCT_OUT) -type l -name "charger" -print0 | xargs -0 rm -f) $(call add-clean-step, rm -f $(PRODUCT_OUT)/system/bin/adbd) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/snapshotctl.rc) diff --git a/fs_mgr/libsnapshot/Android.bp b/fs_mgr/libsnapshot/Android.bp index 6c739fc19..0a0a21ddb 100644 --- a/fs_mgr/libsnapshot/Android.bp +++ b/fs_mgr/libsnapshot/Android.bp @@ -235,7 +235,4 @@ cc_binary { // TODO(b/148818798): remove when parent bug is fixed. "libutilscallstack", ], - init_rc: [ - "snapshotctl.rc", - ], } diff --git a/fs_mgr/libsnapshot/snapshotctl.cpp b/fs_mgr/libsnapshot/snapshotctl.cpp index 34d3d69d1..4670eeea0 100644 --- a/fs_mgr/libsnapshot/snapshotctl.cpp +++ b/fs_mgr/libsnapshot/snapshotctl.cpp @@ -178,6 +178,7 @@ bool MergeCmdHandler(int argc, char** argv) { } LOG(ERROR) << "Snapshot failed to merge with state \"" << state << "\"."; + return false; } diff --git a/fs_mgr/libsnapshot/snapshotctl.rc b/fs_mgr/libsnapshot/snapshotctl.rc deleted file mode 100644 index ccb2c410b..000000000 --- a/fs_mgr/libsnapshot/snapshotctl.rc +++ /dev/null @@ -1,2 +0,0 @@ -on property:sys.boot_completed=1 - exec_background - root root -- /system/bin/snapshotctl merge --logcat --log-to-file --report