summaryrefslogtreecommitdiff
path: root/cmds/installd/installd.cpp
diff options
context:
space:
mode:
author David Brazdil <dbrazdil@google.com> 2016-03-08 12:50:20 +0000
committer David Brazdil <dbrazdil@google.com> 2016-03-08 14:36:36 +0000
commitd828d6839f6a01e3f0b2b8b2694139dfa801c557 (patch)
tree2bec5c72c08d8aea41a31be45cad657f6f4b6385 /cmds/installd/installd.cpp
parent9c3e10b4bf83985f138821c5af7c804635242f29 (diff)
Add 'rmprofiles' command to installd
Adds a new command to installd which clears all profile data of a given package. Bug: 27516490 Change-Id: I92cc374b5b6d95ca7755e08b95a9bc9060df2178
Diffstat (limited to 'cmds/installd/installd.cpp')
-rw-r--r--cmds/installd/installd.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmds/installd/installd.cpp b/cmds/installd/installd.cpp
index 54d397075e..7ca7527f68 100644
--- a/cmds/installd/installd.cpp
+++ b/cmds/installd/installd.cpp
@@ -330,6 +330,12 @@ static int do_rm_package_dir(char **arg, char reply[REPLY_MAX] ATTRIBUTE_UNUSED)
return rm_package_dir(arg[0]);
}
+static int do_rm_profiles(char **arg, char reply[REPLY_MAX] ATTRIBUTE_UNUSED)
+{
+ /* package_name */
+ return rm_profiles(arg[0]);
+}
+
static int do_link_file(char **arg, char reply[REPLY_MAX] ATTRIBUTE_UNUSED)
{
/* relative_path, from_base, to_base */
@@ -368,6 +374,7 @@ struct cmdinfo cmds[] = {
{ "idmap", 3, do_idmap },
{ "createoatdir", 2, do_create_oat_dir },
{ "rmpackagedir", 1, do_rm_package_dir },
+ { "rmprofiles", 1, do_rm_profiles },
{ "linkfile", 3, do_link_file },
{ "move_ab", 3, do_move_ab },
};