• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/corennnnn


Commit MetaInfo

Revision68ab20febd1dd1a033ee9d25fa2ab30c0b13e469 (tree)
Time2016-06-30 02:36:13
AuthorAlex Light <allight@goog...>
CommiterAlex Light

Log Message

Add umount call to init to unmount a filesystem

Bug: 29278988
Change-Id: Ia14ab1bcad9513688df97f7b4d9162a9ab282480

Change Summary

Incremental Difference

--- a/init/builtins.cpp
+++ b/init/builtins.cpp
@@ -345,6 +345,11 @@ static int do_mkdir(const std::vector<std::string>& args) {
345345 return 0;
346346 }
347347
348+/* umount <path> */
349+static int do_umount(const std::vector<std::string>& args) {
350+ return umount(args[1].c_str());
351+}
352+
348353 static struct {
349354 const char *name;
350355 unsigned flag;
@@ -958,6 +963,7 @@ BuiltinFunctionMap::Map& BuiltinFunctionMap::map() const {
958963 {"mkdir", {1, 4, do_mkdir}},
959964 {"mount_all", {1, kMax, do_mount_all}},
960965 {"mount", {3, kMax, do_mount}},
966+ {"umount", {1, 1, do_umount}},
961967 {"powerctl", {1, 1, do_powerctl}},
962968 {"restart", {1, 1, do_restart}},
963969 {"restorecon", {1, kMax, do_restorecon}},
--- a/init/readme.txt
+++ b/init/readme.txt
@@ -355,6 +355,9 @@ trigger <event>
355355 Trigger an event. Used to queue an action from another
356356 action.
357357
358+umount <path>
359+ Unmount the filesystem mounted at that path.
360+
358361 verity_load_state
359362 Internal implementation detail used to load dm-verity state.
360363