summaryrefslogtreecommitdiff
path: root/init/builtins.cpp
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2015-07-30 21:31:38 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-30 21:31:38 +0000
commit7da270df1d020c8b1ebcd636ae090d1edc1f7e89 (patch)
tree30f98f82ce39359cfc46450dd49f2691666c42b9 /init/builtins.cpp
parent9e12d940029ba70b84d8a6b5df1266204c548e51 (diff)
parenta21d85620560896bbed0cd43db9ed3224ab4e974 (diff)
am a21d8562: am d548e30f: Merge "init: Create classes for Action and Command"
* commit 'a21d85620560896bbed0cd43db9ed3224ab4e974': init: Create classes for Action and Command
Diffstat (limited to 'init/builtins.cpp')
-rw-r--r--init/builtins.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/init/builtins.cpp b/init/builtins.cpp
index 87e56bc4e..beeaa1768 100644
--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -43,6 +43,7 @@
#include <logwrap/logwrap.h>
#include <private/android_filesystem_config.h>
+#include "action.h"
#include "init.h"
#include "keywords.h"
#include "property_service.h"
@@ -513,7 +514,7 @@ int do_mount_all(int nargs, char **args)
/* If fs_mgr determined this is an unencrypted device, then trigger
* that action.
*/
- action_for_each_trigger("nonencrypted", action_add_queue_tail);
+ ActionManager::GetInstance().QueueEventTrigger("nonencrypted");
} else if (ret == FS_MGR_MNTALL_DEV_NEEDS_RECOVERY) {
/* Setup a wipe via recovery, and reboot into recovery */
ERROR("fs_mgr_mount_all suggested recovery, so wiping data via recovery.\n");
@@ -528,7 +529,7 @@ int do_mount_all(int nargs, char **args)
// Although encrypted, we have device key, so we do not need to
// do anything different from the nonencrypted case.
- action_for_each_trigger("nonencrypted", action_add_queue_tail);
+ ActionManager::GetInstance().QueueEventTrigger("nonencrypted");
} else if (ret == FS_MGR_MNTALL_DEV_NON_DEFAULT_FILE_ENCRYPTED) {
if (e4crypt_install_keyring()) {
return -1;
@@ -639,7 +640,7 @@ int do_powerctl(int nargs, char **args)
int do_trigger(int nargs, char **args)
{
- action_for_each_trigger(args[1], action_add_queue_tail);
+ ActionManager::GetInstance().QueueEventTrigger(args[1]);
return 0;
}
@@ -676,7 +677,7 @@ int do_verity_load_state(int nargs, char **args) {
int mode = -1;
int rc = fs_mgr_load_verity_state(&mode);
if (rc == 0 && mode == VERITY_MODE_LOGGING) {
- action_for_each_trigger("verity-logging", action_add_queue_tail);
+ ActionManager::GetInstance().QueueEventTrigger("verity-logging");
}
return rc;
}