system/corennnnn
Revision | 68ab20febd1dd1a033ee9d25fa2ab30c0b13e469 (tree) |
---|---|
Time | 2016-06-30 02:36:13 |
Author | Alex Light <allight@goog...> |
Commiter | Alex Light |
Add umount call to init to unmount a filesystem
Bug: 29278988
Change-Id: Ia14ab1bcad9513688df97f7b4d9162a9ab282480
@@ -345,6 +345,11 @@ static int do_mkdir(const std::vector<std::string>& args) { | ||
345 | 345 | return 0; |
346 | 346 | } |
347 | 347 | |
348 | +/* umount <path> */ | |
349 | +static int do_umount(const std::vector<std::string>& args) { | |
350 | + return umount(args[1].c_str()); | |
351 | +} | |
352 | + | |
348 | 353 | static struct { |
349 | 354 | const char *name; |
350 | 355 | unsigned flag; |
@@ -958,6 +963,7 @@ BuiltinFunctionMap::Map& BuiltinFunctionMap::map() const { | ||
958 | 963 | {"mkdir", {1, 4, do_mkdir}}, |
959 | 964 | {"mount_all", {1, kMax, do_mount_all}}, |
960 | 965 | {"mount", {3, kMax, do_mount}}, |
966 | + {"umount", {1, 1, do_umount}}, | |
961 | 967 | {"powerctl", {1, 1, do_powerctl}}, |
962 | 968 | {"restart", {1, 1, do_restart}}, |
963 | 969 | {"restorecon", {1, kMax, do_restorecon}}, |
@@ -355,6 +355,9 @@ trigger <event> | ||
355 | 355 | Trigger an event. Used to queue an action from another |
356 | 356 | action. |
357 | 357 | |
358 | +umount <path> | |
359 | + Unmount the filesystem mounted at that path. | |
360 | + | |
358 | 361 | verity_load_state |
359 | 362 | Internal implementation detail used to load dm-verity state. |
360 | 363 |