diff options
author | Tom Cherry <tomcherry@google.com> | 2015-07-30 21:03:48 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-07-30 21:03:48 +0000 |
commit | d548e30f04b2eb7aa00deab42f5559d08396c38e (patch) | |
tree | d497a9db9abe101a277e3787da9d00097a810c01 /init/builtins.cpp | |
parent | eb0b151369371993a70c2079b8253f6dd24814b7 (diff) | |
parent | fa0c21c94ccb98bfa5cf3cc7a6b220be4a5fa378 (diff) |
Merge "init: Create classes for Action and Command"
Diffstat (limited to 'init/builtins.cpp')
-rw-r--r-- | init/builtins.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/init/builtins.cpp b/init/builtins.cpp index d05f046f2..4bc3b875e 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; } |