diff options
| author | San Mehat <san@google.com> | 2010-01-18 07:14:02 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-01-18 07:14:02 -0800 |
| commit | 2b7ff1c47147e31521a3ef9e7d02252111192cb3 (patch) | |
| tree | 32ca31462eafb0bdb075ffa47e72a7438c73e1cc /media/sdutils/sdutil.cpp | |
| parent | 840e958847f31f835dbf17ce539c9f8317251cc9 (diff) | |
| parent | 9dba709d4439d8cdb464a3dcccbddffdbe4b10ff (diff) | |
| download | frameworks_base-2b7ff1c47147e31521a3ef9e7d02252111192cb3.zip frameworks_base-2b7ff1c47147e31521a3ef9e7d02252111192cb3.tar.gz frameworks_base-2b7ff1c47147e31521a3ef9e7d02252111192cb3.tar.bz2 | |
Merge "MountService: Add new 'unmountSecureContainer' API call"
Diffstat (limited to 'media/sdutils/sdutil.cpp')
| -rw-r--r-- | media/sdutils/sdutil.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/media/sdutils/sdutil.cpp b/media/sdutils/sdutil.cpp index a30e59c..322f743 100644 --- a/media/sdutils/sdutil.cpp +++ b/media/sdutils/sdutil.cpp @@ -129,6 +129,11 @@ static int asec_mount(const char *id, const char *key, int ownerUid) { return 0; } +static void asec_unmount(const char *id) { + String16 sId(id); + gMountService->unmountSecureContainer(sId); +} + static int asec_path(const char *id) { String16 sId(id); gMountService->getSecureContainerPath(sId); @@ -208,6 +213,9 @@ int main(int argc, char **argv) return android::asec_destroy(id); } else if (!strcmp(argument, "mount")) { return android::asec_mount(id, argv[4], atoi(argv[5])); + } else if (!strcmp(argument, "unmount")) { + android::asec_unmount(id); + return 0; } else if (!strcmp(argument, "path")) { return android::asec_path(id); } @@ -224,6 +232,7 @@ usage: " sdutil asec finalize <id>\n" " sdutil asec destroy <id>\n" " sdutil asec mount <id> <key> <ownerUid>\n" + " sdutil asec unmount <id>\n" " sdutil asec path <id>\n" ); return -1; |
