diff options
author | Alex Light <allight@google.com> | 2016-06-23 11:11:39 -0700 |
---|---|---|
committer | Alex Light <allight@google.com> | 2016-06-29 17:36:13 +0000 |
commit | 68ab20febd1dd1a033ee9d25fa2ab30c0b13e469 (patch) | |
tree | e1087bbbddac7b273b1483a062df453c87ef99c9 /init/builtins.cpp | |
parent | 89eb689d5cdc153f1daa7eb87de4ac04381494f0 (diff) |
Add umount call to init to unmount a filesystem
Bug: 29278988
Change-Id: Ia14ab1bcad9513688df97f7b4d9162a9ab282480
Diffstat (limited to 'init/builtins.cpp')
-rw-r--r-- | init/builtins.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/init/builtins.cpp b/init/builtins.cpp index f3f04c2ad..ee83224a2 100644 --- a/init/builtins.cpp +++ b/init/builtins.cpp @@ -345,6 +345,11 @@ static int do_mkdir(const std::vector<std::string>& args) { return 0; } +/* umount <path> */ +static int do_umount(const std::vector<std::string>& args) { + return umount(args[1].c_str()); +} + static struct { const char *name; unsigned flag; @@ -958,6 +963,7 @@ BuiltinFunctionMap::Map& BuiltinFunctionMap::map() const { {"mkdir", {1, 4, do_mkdir}}, {"mount_all", {1, kMax, do_mount_all}}, {"mount", {3, kMax, do_mount}}, + {"umount", {1, 1, do_umount}}, {"powerctl", {1, 1, do_powerctl}}, {"restart", {1, 1, do_restart}}, {"restorecon", {1, kMax, do_restorecon}}, |