diff options
author | 2016-06-01 23:09:26 +0000 | |
---|---|---|
committer | 2016-06-01 23:09:26 +0000 | |
commit | eed4df806856e77d9d55d8209d7178e4b5c945e8 (patch) | |
tree | 4b15206dd7da072c8572a31fc0e0384c635d0a7d /cmds/installd/installd.cpp | |
parent | 134ef03161e51f7ba19c66f2dc823fb46189b4f3 (diff) | |
parent | 6727c2d0bfc876c62d6ee60d8a05d26bef1d56ef (diff) |
installd support for profman --dump-info-for
am: 6727c2d0bf
* commit '6727c2d0bfc876c62d6ee60d8a05d26bef1d56ef':
installd support for profman --dump-info-for
Change-Id: I2289ea8e788f65deb158f422b1c3b4feb93b9477
Diffstat (limited to 'cmds/installd/installd.cpp')
-rw-r--r-- | cmds/installd/installd.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cmds/installd/installd.cpp b/cmds/installd/installd.cpp index d99d9ddd5b..1583f86cea 100644 --- a/cmds/installd/installd.cpp +++ b/cmds/installd/installd.cpp @@ -282,6 +282,19 @@ static int do_merge_profiles(char **arg, char reply[REPLY_MAX]) return 0; } +static int do_dump_profiles(char **arg, char reply[REPLY_MAX]) +{ + uid_t uid = static_cast<uid_t>(atoi(arg[0])); + const char* pkgname = arg[1]; + const char* dex_files = arg[2]; + if (dump_profile(uid, pkgname, dex_files)) { + strncpy(reply, "true", REPLY_MAX); + } else { + strncpy(reply, "false", REPLY_MAX); + } + return 0; +} + static int do_mark_boot_complete(char **arg, char reply[REPLY_MAX] ATTRIBUTE_UNUSED) { return mark_boot_complete(arg[0] /* instruction set */); @@ -428,6 +441,7 @@ struct cmdinfo cmds[] = { { "linkfile", 3, do_link_file }, { "move_ab", 3, do_move_ab }, { "merge_profiles", 2, do_merge_profiles }, + { "dump_profiles", 3, do_dump_profiles }, }; static int readx(int s, void *_buf, int count) |